Fan Club: make forced animations properly restart

This commit is contained in:
minenice55 2022-03-17 15:18:40 -04:00
parent 7d6fe11243
commit 523926a692
2 changed files with 9 additions and 9 deletions

View file

@ -167,33 +167,33 @@ namespace HeavenStudio.Games
switch (type)
{
case (int) IdolAnimations.Bop:
idolAnimator.Play("IdolBeat");
idolAnimator.Play("IdolBeat", -1, 0);
break;
case (int) IdolAnimations.PeaceVocal:
idolAnimator.Play("IdolPeace");
idolAnimator.Play("IdolPeace", -1, 0);
break;
case (int) IdolAnimations.Peace:
idolAnimator.Play("IdolPeaceNoSync");
idolAnimator.Play("IdolPeaceNoSync", -1, 0);
break;
case (int) IdolAnimations.Clap:
idolAnimator.Play("IdolCrap");
idolAnimator.Play("IdolCrap", -1, 0);
idolClapEffect.Play();
break;
case (int) IdolAnimations.Call:
BeatAction.New(Arisa, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolCall0"); }),
new BeatAction.Action(beat + 0.75f, delegate { Arisa.GetComponent<Animator>().Play("IdolCall1"); }),
new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolCall0", -1, 0); }),
new BeatAction.Action(beat + 0.75f, delegate { Arisa.GetComponent<Animator>().Play("IdolCall1", -1, 0); }),
});
break;
case (int) IdolAnimations.Response:
idolAnimator.Play("IdolResponse");
idolAnimator.Play("IdolResponse", -1, 0);
break;
case (int) IdolAnimations.Jump:
DoIdolJump(beat);
break;
case (int) IdolAnimations.Dab:
idolAnimator.Play("IdolDab");
idolAnimator.Play("IdolDab", -1, 0);
Jukebox.PlayOneShotGame("fanClub/arisa_dab");
break;
}

View file

@ -440,7 +440,7 @@ namespace HeavenStudio
new GameAction("double clap", delegate { FanClub.instance.CallBigReady(eventCaller.currentEntity.beat); }, 4, false,
// TODO: pre-switch cues
inactiveFunction: delegate { FanClub.WarnBigReady(eventCaller.currentEntity.beat); }),
new GameAction("play idol animation", delegate { var e = eventCaller.currentEntity; FanClub.instance.PlayAnim(e.beat, e.length, e.type); }, 1f, parameters: new List<Param>()
new GameAction("play idol animation", delegate { var e = eventCaller.currentEntity; FanClub.instance.PlayAnim(e.beat, e.length, e.type); }, 1f, true, parameters: new List<Param>()
{
new Param("type", FanClub.IdolAnimations.Bop, "Animation", "Animation to play")
}),