From dec99626857f35b3d578bfcc938eefa4b2b518c6 Mon Sep 17 00:00:00 2001 From: Rapandrasmus <78219215+Rapandrasmus@users.noreply.github.com> Date: Thu, 25 Jan 2024 18:08:12 +0100 Subject: [PATCH] fix --- Assets/Scripts/Games/TotemClimb/TCFrog.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Games/TotemClimb/TCFrog.cs b/Assets/Scripts/Games/TotemClimb/TCFrog.cs index 9f24b06ea..da7dcfcdc 100644 --- a/Assets/Scripts/Games/TotemClimb/TCFrog.cs +++ b/Assets/Scripts/Games/TotemClimb/TCFrog.cs @@ -24,6 +24,16 @@ namespace HeavenStudio.Games.Scripts_TotemClimb public Transform JumperPointRight => _jumperPointRight; private bool _hasWings = false; + private bool _flapSet = false; // I hate unity + + private void Update() + { + if (!_anim.GetCurrentAnimatorStateInfo(0).IsName("Wings") && _hasWings && !_flapSet) + { + _anim.Play("Wings", 0, 0); + _flapSet = true; + } + } public void FallPiece(int part) { @@ -45,7 +55,6 @@ namespace HeavenStudio.Games.Scripts_TotemClimb public void SetHasWings() { _hasWings = true; - _anim.Play("Wings", 0, 0); } } }