From 50dae86d4c7d5ca597d5a3984ad0c2de08e84edd Mon Sep 17 00:00:00 2001 From: BulbyVR <26726264+TheDrawingCoder-Gamer@users.noreply.github.com> Date: Mon, 8 Jul 2024 13:45:32 -0400 Subject: [PATCH] fix circle note --- assets/exclude/data/components/menubar.xml | 2 + source/Note.hx | 6 +++ source/PlayState.hx | 56 ++++++++++------------ 3 files changed, 33 insertions(+), 31 deletions(-) diff --git a/assets/exclude/data/components/menubar.xml b/assets/exclude/data/components/menubar.xml index 82f45bc..0c17521 100644 --- a/assets/exclude/data/components/menubar.xml +++ b/assets/exclude/data/components/menubar.xml @@ -20,6 +20,8 @@ + + diff --git a/source/Note.hx b/source/Note.hx index 7d71cc2..1973a96 100644 --- a/source/Note.hx +++ b/source/Note.hx @@ -87,6 +87,10 @@ class Note extends FlxSprite animation.add('liftNote-diagonal', [10]); animation.add('tapNote-center', [16]); animation.add('liftNote-center', [17]); + animation.add('tapNote-bar', [24]); + animation.add('liftNote-bar', [25]); + animation.add('tapNote-circle', [30]); + animation.add('liftNote-circle', [31]); animation.add('mineNote', [21]); animation.add('nukeNote', [22]); @@ -155,6 +159,8 @@ class Note extends FlxSprite if (noteData.kind != "mine" && noteData.kind != "nuke") { angle = gamemode.notes[noteData.data].rot90 * 90; + } else { + angle = 0; } diff --git a/source/PlayState.hx b/source/PlayState.hx index cf14197..c6f7ffb 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -97,7 +97,6 @@ typedef HoldSelect = { // we don't have to worry about backspaces ^-^ @:build(haxe.ui.macros.ComponentMacros.build("assets/exclude/data/main-view.xml")) -@:allow(SongDataEditor) class PlayState extends UIState{ public var songData:SongData = new SongData("test", "unknown"); @@ -573,39 +572,12 @@ class PlayState extends UIState{ } if (FlxG.keys.justPressed.Q) { - curKeyType -= 1; - curKeyType = cast FlxMath.wrap(curKeyType, 0, Death); - switch (curKeyType) - { - case Normal: - noteTypeText.text = "Normal Note"; - case Lift: - noteTypeText.text = "Lift Note"; - case Mine: - noteTypeText.text = "Mine Note"; - case Death: - noteTypeText.text = "Death Note"; - default: - noteTypeText.text = 'Custom Note ${curKeyType - 4}'; - } + changeNoteKind(false); } else if (FlxG.keys.justPressed.E) { - curKeyType += 1; - curKeyType = cast FlxMath.wrap(curKeyType, 0, 99); - switch (curKeyType) - { - case Normal: - noteTypeText.text = "Normal Note"; - case Lift: - noteTypeText.text = "Lift Note"; - case Mine: - noteTypeText.text = "Mine Note"; - case Death: - noteTypeText.text = "Death Note"; - default: - noteTypeText.text = 'Custom Note ${curKeyType - 4}'; - } + changeNoteKind(true); + } if (FlxG.keys.justPressed.RIGHT) { @@ -867,6 +839,28 @@ class PlayState extends UIState{ updateNotes(); } + private function changeNoteKind(increase:Bool): Void { + if (increase) { + curKeyType += 1; + } else { + curKeyType -= 1; + } + curKeyType = cast FlxMath.wrap(curKeyType, 0, Death); + switch (curKeyType) + { + case Normal: + noteTypeText.text = "Normal Note"; + case Lift: + noteTypeText.text = "Lift Note"; + case Mine: + noteTypeText.text = "Mine Note"; + case Death: + noteTypeText.text = "Death Note"; + default: + noteTypeText.text = 'Custom Note ${curKeyType - 4}'; + } + } + private function changeSnap(increase:Bool) { // i have no idea why it isn't throwing a hissy fit. Let's keep it that way.