From 523926a69226487c733239050089146157716577 Mon Sep 17 00:00:00 2001 From: minenice55 Date: Thu, 17 Mar 2022 15:18:40 -0400 Subject: [PATCH] Fan Club: make forced animations properly restart --- Assets/Scripts/Games/FanClub/FanClub.cs | 16 ++++++++-------- Assets/Scripts/Minigames.cs | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Assets/Scripts/Games/FanClub/FanClub.cs b/Assets/Scripts/Games/FanClub/FanClub.cs index 266932c6..67d0a933 100644 --- a/Assets/Scripts/Games/FanClub/FanClub.cs +++ b/Assets/Scripts/Games/FanClub/FanClub.cs @@ -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() { - new BeatAction.Action(beat, delegate { Arisa.GetComponent().Play("IdolCall0"); }), - new BeatAction.Action(beat + 0.75f, delegate { Arisa.GetComponent().Play("IdolCall1"); }), + new BeatAction.Action(beat, delegate { Arisa.GetComponent().Play("IdolCall0", -1, 0); }), + new BeatAction.Action(beat + 0.75f, delegate { Arisa.GetComponent().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; } diff --git a/Assets/Scripts/Minigames.cs b/Assets/Scripts/Minigames.cs index 0029b391..37d880e7 100644 --- a/Assets/Scripts/Minigames.cs +++ b/Assets/Scripts/Minigames.cs @@ -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() + new GameAction("play idol animation", delegate { var e = eventCaller.currentEntity; FanClub.instance.PlayAnim(e.beat, e.length, e.type); }, 1f, true, parameters: new List() { new Param("type", FanClub.IdolAnimations.Bop, "Animation", "Animation to play") }),