diff --git a/Assets/Resources/Games/rhythmRally.prefab b/Assets/Resources/Games/rhythmRally.prefab index fb1169d6..bf2b7fae 100644 --- a/Assets/Resources/Games/rhythmRally.prefab +++ b/Assets/Resources/Games/rhythmRally.prefab @@ -280,7 +280,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &4959957736091286558 Transform: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Games/RhythmRally/Paddlers.cs b/Assets/Scripts/Games/RhythmRally/Paddlers.cs index b5f0ea5b..8c152356 100644 --- a/Assets/Scripts/Games/RhythmRally/Paddlers.cs +++ b/Assets/Scripts/Games/RhythmRally/Paddlers.cs @@ -93,6 +93,8 @@ namespace RhythmHeavenMania.Games.RhythmRally whistleBeat = game.targetBeat + 0.5f; } + game.ball.SetActive(false); + MultiSound.Play(new MultiSound.Sound[] { new MultiSound.Sound("rhythmRally/Whistle", whistleBeat) }); } diff --git a/Assets/Scripts/Games/RhythmRally/RhythmRally.cs b/Assets/Scripts/Games/RhythmRally/RhythmRally.cs index 415412e4..1bab7892 100644 --- a/Assets/Scripts/Games/RhythmRally/RhythmRally.cs +++ b/Assets/Scripts/Games/RhythmRally/RhythmRally.cs @@ -155,7 +155,7 @@ namespace RhythmHeavenMania.Games.RhythmRally curveHeight = 3f; curveToUse.transform.localScale = new Vector3(1f, curveHeight, 1f); - ball.transform.position = curveToUse.GetPoint(Mathf.Clamp(curvePosition, 0, 1)); + ball.transform.position = curveToUse.GetPoint(Mathf.Max(0, curvePosition)); } else { @@ -261,6 +261,9 @@ namespace RhythmHeavenMania.Games.RhythmRally public void Serve(float beat, RallySpeed speed) { + if (!ball.activeSelf) + ball.SetActive(true); + served = true; missed = false; started = true; @@ -308,6 +311,9 @@ namespace RhythmHeavenMania.Games.RhythmRally opponentAnim.Play("Ready1"); } + if (!ball.activeSelf) + ball.SetActive(true); + StartCoroutine(TossTrailCo()); } @@ -337,7 +343,7 @@ namespace RhythmHeavenMania.Games.RhythmRally { playerAnim.Play("Pose", 0, 0); opponentAnim.Play("Pose", 0, 0); - ball.gameObject.SetActive(false); // temporary solution, should realistically just fall down + ball.SetActive(false); // temporary solution, should realistically just fall down inPose = true; }