mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-29 10:13:32 +00:00
Merge branch 'feature/new-input-system-yay' into feature/chart-editor-song-preview
This commit is contained in:
commit
03444161e8
6
hmm.json
6
hmm.json
|
@ -66,8 +66,10 @@
|
|||
},
|
||||
{
|
||||
"name": "hxCodec",
|
||||
"type": "haxelib",
|
||||
"version": "3.0.1"
|
||||
"type": "git",
|
||||
"dir": null,
|
||||
"ref": "develop",
|
||||
"url": "https://github.com/polybiusproxy/hxCodec"
|
||||
},
|
||||
{
|
||||
"name": "hxcpp",
|
||||
|
|
|
@ -686,6 +686,9 @@ class PlayState extends MusicBeatSubState
|
|||
|
||||
currentStage.resetStage();
|
||||
|
||||
playerStrumline.clean();
|
||||
opponentStrumline.clean();
|
||||
|
||||
// Delete all notes and reset the arrays.
|
||||
regenNoteData();
|
||||
|
||||
|
|
|
@ -398,6 +398,38 @@ class Strumline extends FlxSpriteGroup
|
|||
return heldKeys[dir];
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the song is reset.
|
||||
* Removes any special animations and the like.
|
||||
* Doesn't reset the notes from the chart, that's handled by the PlayState.
|
||||
*/
|
||||
public function clean():Void
|
||||
{
|
||||
for (note in notes.members)
|
||||
{
|
||||
if (note == null) continue;
|
||||
killNote(note);
|
||||
}
|
||||
|
||||
for (holdNote in holdNotes.members)
|
||||
{
|
||||
if (holdNote == null) continue;
|
||||
holdNote.kill();
|
||||
}
|
||||
|
||||
for (splash in noteSplashes)
|
||||
{
|
||||
if (splash == null) continue;
|
||||
splash.kill();
|
||||
}
|
||||
|
||||
for (cover in noteHoldCovers)
|
||||
{
|
||||
if (cover == null) continue;
|
||||
cover.kill();
|
||||
}
|
||||
}
|
||||
|
||||
public function applyNoteData(data:Array<SongNoteData>):Void
|
||||
{
|
||||
this.notes.clear();
|
||||
|
@ -425,6 +457,7 @@ class Strumline extends FlxSpriteGroup
|
|||
|
||||
public function killNote(note:NoteSprite):Void
|
||||
{
|
||||
if (note == null) return;
|
||||
note.visible = false;
|
||||
notes.remove(note, false);
|
||||
note.kill();
|
||||
|
|
|
@ -289,6 +289,20 @@ class SustainTrail extends FlxSprite
|
|||
missedNote = false;
|
||||
}
|
||||
|
||||
public override function revive():Void
|
||||
{
|
||||
super.revive();
|
||||
|
||||
strumTime = 0;
|
||||
noteDirection = 0;
|
||||
sustainLength = 0;
|
||||
fullSustainLength = 0;
|
||||
noteData = null;
|
||||
|
||||
hitNote = false;
|
||||
missedNote = false;
|
||||
}
|
||||
|
||||
override public function destroy():Void
|
||||
{
|
||||
vertices = null;
|
||||
|
|
Loading…
Reference in a new issue