change operation order for input checks

This commit is contained in:
minenice55
2024-01-25 15:11:43 -05:00
parent 9f0a48e9ff
commit 9be16564a0
12 changed files with 81 additions and 149 deletions

View File

@ -169,23 +169,21 @@ namespace HeavenStudio.Games.Scripts_DJSchool
public void OnHitSwipe(PlayerActionEvent caller, float beat)
{
game.shouldBeHolding = false;
isHolding = false;
swiping = true;
SoundByte.PlayOneShotGame("djSchool/recordSwipe");
anim.Play("Swipe", 0, 0);
if (beat >= 1f || beat <= -1f) missed = true;
if (!missed)
{
isHolding = false;
missed = false;
shouldBeHolding = false;
SoundByte.PlayOneShotGame("djSchool/recordSwipe");
FlashFX(false);
swiping = true;
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { anim.Play("Swipe", 0, 0); }),
new BeatAction.Action(beat + 4f, delegate { swiping = false; }),
});
//anim.Play("Swipe", 0, 0);
game.djYellowScript.ChangeHeadSprite(DJYellow.DJExpression.UpSecond);
game.djYellowScript.Reverse();
game.smileBeat = caller.timer + caller.startBeat + 1f;
@ -199,13 +197,10 @@ namespace HeavenStudio.Games.Scripts_DJSchool
else
{
OnMissSwipeForPlayerInput(caller.timer + caller.startBeat + 1);
SoundByte.PlayOneShotGame("djSchool/recordSwipe");
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { anim.Play("Swipe", 0, 0); }),
new BeatAction.Action(beat + 4f, delegate { swiping = false; }),
});
//anim.Play("Swipe", 0, 0);
tableAnim.speed = 1;
tableAnim.DoScaledAnimationAsync("Student_Turntable_Swipe", 0.5f);
@ -304,7 +299,6 @@ namespace HeavenStudio.Games.Scripts_DJSchool
}
}
//Not sure but will do?
private void OnDestroy()
{