Skip to content

Commit

Permalink
fix circle note
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDrawingCoder-Gamer committed Jul 8, 2024
1 parent bf2740b commit 50dae86
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 31 deletions.
2 changes: 2 additions & 0 deletions assets/exclude/data/components/menubar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<menu-separator/>
<menu-item id="prevChartMenu" text="Previous Chart" shortcutText="F4"/>
<menu-item id="nextChartMenu" text="Next Chart" shortcutText="F5"/>
<menu-separator/>
<menu-checkbox id="toggleToolboxCharts" text="Charts..." disabled="true"/>
</menu>
<menu text="Window">
<menu-checkbox id="toggleToolboxMetadata" text="Metadata"/>
Expand Down
6 changes: 6 additions & 0 deletions source/Note.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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]);

Expand Down Expand Up @@ -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;
}


Expand Down
56 changes: 25 additions & 31 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 50dae86

Please sign in to comment.