broke da gayme

This commit is contained in:
Yoshman29
2022-10-27 03:38:54 +02:00
parent 306d84cd36
commit 8432587fc0
3 changed files with 14 additions and 6 deletions
+1 -1
View File
@@ -1 +1 @@
775
776
+6 -1
View File
@@ -332,9 +332,14 @@ class Character extends FlxSprite implements IBeatReceiver implements IOffsetCom
}
}
/**
* Whenever the character should dance on beat or not. Set to false for `gf`, since the dance animation is automatically handled by PlayState.
*/
public var danceOnBeat:Bool = true;
public function beatHit(curBeat:Int) {
script.call("beatHit", [curBeat]);
if ((lastHit + (Conductor.stepCrochet * holdTime) < Conductor.songPosition) || animation.curAnim == null || (!animation.curAnim.name.startsWith("sing") && animation.curAnim.finished))
if (danceOnBeat && (lastHit + (Conductor.stepCrochet * holdTime) < Conductor.songPosition) || animation.curAnim == null || (!animation.curAnim.name.startsWith("sing") && animation.curAnim.finished))
dance();
}
public function stepHit(curStep:Int) {
+7 -4
View File
@@ -233,10 +233,13 @@ class PlayState extends MusicBeatState
scripts.load();
scripts.call("create");
add(gf);
if (gf != null) {
gf.danceOnBeat = false;
add(gf);
}
add(dad);
add(boyfriend);
if (dad != null) add(dad);
if (boyfriend != null) add(boyfriend);
strumLine = new FlxSprite(0, 50).makeGraphic(FlxG.width, 10);
@@ -951,7 +954,7 @@ class PlayState extends MusicBeatState
daNote.tooLate = true;
}
else
canBeHit = false;
daNote.canBeHit = false;
if (!daNote.mustPress && !daNote.wasGoodHit && daNote.strumTime <= Conductor.songPosition) goodNoteHit(daNote);
// TODO: FIXED STEP CROCHET PER NOTES FOR BPM CHANGES