From d8ff6744c058ab2f93bd18f9456764e0451cbf85 Mon Sep 17 00:00:00 2001 From: Rapandrasmus <78219215+Rapandrasmus@users.noreply.github.com> Date: Mon, 12 Jun 2023 21:36:57 +0200 Subject: [PATCH] ball transporter anims for pass turn --- .../Games/WorkingDough/WorkingDough.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Games/WorkingDough/WorkingDough.cs b/Assets/Scripts/Games/WorkingDough/WorkingDough.cs index 67a49fd8..0610ba82 100644 --- a/Assets/Scripts/Games/WorkingDough/WorkingDough.cs +++ b/Assets/Scripts/Games/WorkingDough/WorkingDough.cs @@ -230,7 +230,7 @@ namespace HeavenStudio.Games //Open player transporters /* new BeatAction.Action(beat + interval - 1f, delegate { - ballTransporterLeftPlayer.GetComponent().Play("BallTransporterLeftOpen", 0, 0); + ballTransporterRightPlayer.GetComponent().Play("BallTransporterRightOpen", 0, 0); }), new BeatAction.Action(beat + interval - 1f, delegate { ballTransporterRightPlayer.GetComponent().Play("BallTransporterRightOpen", 0, 0); @@ -268,6 +268,8 @@ namespace HeavenStudio.Games { if (crHandlerInstance.queuedEvents.Count > 0) { + ballTransporterRightPlayer.GetComponent().Play("BallTransporterRightOpen", 0, 0); + ballTransporterLeftPlayer.GetComponent().Play("BallTransporterLeftOpen", 0, 0); foreach (var ball in crHandlerInstance.queuedEvents) { SpawnPlayerBall(beat + ball.relativeBeat, ball.tag == "big"); @@ -285,7 +287,20 @@ namespace HeavenStudio.Games } crHandlerInstance.queuedEvents.Clear(); } - }) + }), + new BeatAction.Action(beat + crHandlerInstance.intervalLength + 2, delegate { if (!crHandlerInstance.IntervalIsActive()) ballTransporterLeftNPC.GetComponent().Play("BallTransporterLeftClose", 0, 0); }), + new BeatAction.Action(beat + crHandlerInstance.intervalLength + 2, delegate { if (!crHandlerInstance.IntervalIsActive()) ballTransporterRightNPC.GetComponent().Play("BallTransporterRightClose", 0, 0); }), + new BeatAction.Action(beat + crHandlerInstance.intervalLength + 2, delegate { if (gandwHasEntered) gandwAnim.Play("MrGameAndWatchLeverDown", 0, 0); }), + //Close player transporters + new BeatAction.Action(beat + crHandlerInstance.intervalLength * 2 + 2, delegate { ballTransporterLeftPlayer.GetComponent().Play("BallTransporterLeftClose", 0, 0); }), + new BeatAction.Action(beat + crHandlerInstance.intervalLength * 2 + 2, delegate { ballTransporterRightPlayer.GetComponent().Play("BallTransporterRightClose", 0, 0); }), + new BeatAction.Action(beat + crHandlerInstance.intervalLength * 2 + 2, delegate { + if (bigModePlayer) + { + PlayerBallTransporters.GetComponent().Play("PlayerExitBigMode", 0, 0); + bigModePlayer = false; + } + }), }); } }