diff --git a/Assets/Resources/Games/totemClimb.prefab b/Assets/Resources/Games/totemClimb.prefab index 3c48767aa..a1cf95fa8 100644 --- a/Assets/Resources/Games/totemClimb.prefab +++ b/Assets/Resources/Games/totemClimb.prefab @@ -16541,7 +16541,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5900117050100066750} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 4.45, y: -3.432, z: 0} + m_LocalPosition: {x: -4.450001, y: -3.432, z: 0} m_LocalScale: {x: 0.584, y: 0.584, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -16939,7 +16939,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 7275193936285157507} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -8.885, y: 11.64, z: 0} + m_LocalPosition: {x: -8.885, y: 11.62, z: 0} m_LocalScale: {x: 0.584, y: 0.584, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -17545,7 +17545,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 8677446887969771736} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -4.45, y: -3.432, z: 0} + m_LocalPosition: {x: -13.35, y: -3.432, z: 0} m_LocalScale: {x: 0.584, y: 0.584, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] diff --git a/Assets/Scripts/Games/TotemClimb/TCJumper.cs b/Assets/Scripts/Games/TotemClimb/TCJumper.cs index 39483668c..bfcfe4ec9 100644 --- a/Assets/Scripts/Games/TotemClimb/TCJumper.cs +++ b/Assets/Scripts/Games/TotemClimb/TCJumper.cs @@ -20,6 +20,7 @@ namespace HeavenStudio.Games.Scripts_TotemClimb private Animator _anim; private TotemClimb _game; private double _startBeat; + private double _onPlayBeat; private void Awake() { @@ -27,8 +28,9 @@ namespace HeavenStudio.Games.Scripts_TotemClimb _game = TotemClimb.instance; } - public void InitPath(double beat) + public void InitPath(double beat, double onPlayBeat) { + _onPlayBeat = onPlayBeat; _startBeat = beat; _path = new Path(); _path.positions = new PathPos[2]; @@ -302,11 +304,11 @@ namespace HeavenStudio.Games.Scripts_TotemClimb if (isTriple) _game.FallFrogAtBeat(caller.startBeat + caller.timer, 1); if (state >= 1f || state <= -1f) { - SoundByte.PlayOneShot("nearMiss"); + if (caller.startBeat + caller.timer >= _onPlayBeat) SoundByte.PlayOneShot("nearMiss"); return; } _jumpParticle.PlayScaledAsync(0.5f); - SoundByte.PlayOneShotGame(isTriple ? "totemClimb/totemlandb" : "totemClimb/totemland"); + if (caller.startBeat + caller.timer >= _onPlayBeat) SoundByte.PlayOneShotGame(isTriple ? "totemClimb/totemlandb" : "totemClimb/totemland"); } private void JustTripleEnter(PlayerActionEvent caller, float state) @@ -315,11 +317,11 @@ namespace HeavenStudio.Games.Scripts_TotemClimb _game.FallFrogAtBeat(caller.startBeat + caller.timer, -1); if (state >= 1f || state <= -1f) { - SoundByte.PlayOneShot("nearMiss"); + if (caller.startBeat + caller.timer >= _onPlayBeat) SoundByte.PlayOneShot("nearMiss"); return; } _jumpParticle.PlayScaledAsync(0.5f); - SoundByte.PlayOneShotGame("totemClimb/totemland"); + if (caller.startBeat + caller.timer >= _onPlayBeat) SoundByte.PlayOneShotGame("totemClimb/totemland"); } private void JustTripleExit(PlayerActionEvent caller, float state) @@ -328,22 +330,22 @@ namespace HeavenStudio.Games.Scripts_TotemClimb _game.FallFrogAtBeat(caller.startBeat + caller.timer, 0); if (state >= 1f || state <= -1f) { - SoundByte.PlayOneShot("nearMiss"); + if (caller.startBeat + caller.timer >= _onPlayBeat) SoundByte.PlayOneShot("nearMiss"); return; } _jumpParticle.PlayScaledAsync(0.5f); - SoundByte.PlayOneShotGame("totemClimb/totemland"); + if (caller.startBeat + caller.timer >= _onPlayBeat) SoundByte.PlayOneShotGame("totemClimb/totemland"); } private void JustHold(PlayerActionEvent caller, float state) { - SoundByte.PlayOneShotGame("totemClimb/chargejump"); + if (caller.startBeat + caller.timer >= _onPlayBeat) SoundByte.PlayOneShotGame("totemClimb/chargejump"); _game.HoldDragonAtBeat(caller.startBeat + caller.timer); StartCoroutine(HoldCo(caller.startBeat + caller.timer)); _anim.DoScaledAnimationAsync("Hold", 0.5f); if (state >= 1f || state <= -1f) { - SoundByte.PlayOneShot("nearMiss"); + if (caller.startBeat + caller.timer >= _onPlayBeat) SoundByte.PlayOneShot("nearMiss"); return; } } @@ -354,11 +356,11 @@ namespace HeavenStudio.Games.Scripts_TotemClimb _game.ReleaseDragonAtBeat(caller.startBeat + caller.timer); if (state >= 1f || state <= -1f) { - SoundByte.PlayOneShot("nearMiss"); + if (caller.startBeat + caller.timer >= _onPlayBeat) SoundByte.PlayOneShot("nearMiss"); return; } _jumpParticle.PlayScaledAsync(0.5f); - SoundByte.PlayOneShotGame("totemClimb/superjumpgood"); + if (caller.startBeat + caller.timer >= _onPlayBeat) SoundByte.PlayOneShotGame("totemClimb/superjumpgood"); } private void Miss(PlayerActionEvent caller) @@ -366,28 +368,28 @@ namespace HeavenStudio.Games.Scripts_TotemClimb StartJumping(caller.startBeat + caller.timer, true); _game.BopTotemAtBeat(caller.startBeat + caller.timer); if (_game.IsTripleBeat(caller.startBeat + caller.timer)) _game.FallFrogAtBeat(caller.startBeat + caller.timer, 1); - SoundByte.PlayOneShot("miss"); + if (caller.startBeat + caller.timer >= _onPlayBeat) SoundByte.PlayOneShot("miss"); } private void MissTripleEnter(PlayerActionEvent caller) { TripleJumping(caller.startBeat + caller.timer, true, true); _game.FallFrogAtBeat(caller.startBeat + caller.timer, -1); - SoundByte.PlayOneShot("miss"); + if (caller.startBeat + caller.timer >= _onPlayBeat) SoundByte.PlayOneShot("miss"); } private void MissTripleExit(PlayerActionEvent caller) { TripleJumping(caller.startBeat + caller.timer, false, true); _game.FallFrogAtBeat(caller.startBeat + caller.timer, 0); - SoundByte.PlayOneShot("miss"); + if (caller.startBeat + caller.timer >= _onPlayBeat) SoundByte.PlayOneShot("miss"); } private void MissRelease(PlayerActionEvent caller) { HighJump(caller.startBeat + caller.timer, true); _game.ReleaseDragonAtBeat(caller.startBeat + caller.timer); - SoundByte.PlayOneShot("miss"); + if (caller.startBeat + caller.timer >= _onPlayBeat) SoundByte.PlayOneShot("miss"); } private void Empty(PlayerActionEvent caller) { } diff --git a/Assets/Scripts/Games/TotemClimb/TotemClimb.cs b/Assets/Scripts/Games/TotemClimb/TotemClimb.cs index 6284561aa..776a48e9f 100644 --- a/Assets/Scripts/Games/TotemClimb/TotemClimb.cs +++ b/Assets/Scripts/Games/TotemClimb/TotemClimb.cs @@ -90,7 +90,7 @@ namespace HeavenStudio.Games GetTripleEvents(); HandleBopsOnStart(beat); _totemManager.InitBeats(_startBeat); - _jumper.InitPath(_startBeat); + _jumper.InitPath(_startBeat, beat); } public override void OnPlay(double beat) @@ -104,7 +104,7 @@ namespace HeavenStudio.Games GetTripleEvents(); HandleBopsOnStart(beat); _totemManager.InitBeats(_startBeat); - _jumper.InitPath(_startBeat); + _jumper.InitPath(_startBeat, beat); } private void CalculateStartAndEndBeat(double beat)