From cd94ee3761f03901a41a9a49e131d952e3ad8f55 Mon Sep 17 00:00:00 2001 From: Rapandrasmus <78219215+Rapandrasmus@users.noreply.github.com> Date: Thu, 3 Aug 2023 22:26:40 +0200 Subject: [PATCH] fixed (#521) --- Assets/Scripts/Games/AirRally/AirRally.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Assets/Scripts/Games/AirRally/AirRally.cs b/Assets/Scripts/Games/AirRally/AirRally.cs index 2d76e74b..18c968c8 100644 --- a/Assets/Scripts/Games/AirRally/AirRally.cs +++ b/Assets/Scripts/Games/AirRally/AirRally.cs @@ -1365,7 +1365,7 @@ namespace HeavenStudio.Games SoundByte.PlayOneShotGame("airRally/birdieCatch"); shuttleActive = false; recursingRally = false; - if (ActiveShuttle != null) Destroy(ActiveShuttle); + if (ActiveShuttle != null) Destroy(ActiveShuttle.gameObject); } public void RallyOnHit(PlayerActionEvent caller, float state) @@ -1374,7 +1374,7 @@ namespace HeavenStudio.Games if (state >= 1 || state <= -1) { - ActiveShuttle.GetComponent().DoNearMiss(); + ActiveShuttle.DoNearMiss(); hasMissed = true; shuttleActive = false; ActiveShuttle = null; @@ -1383,7 +1383,7 @@ namespace HeavenStudio.Games { ReturnObject(Conductor.instance.songPositionInBeatsAsDouble, caller.startBeat + caller.timer + 1f, false); hasMissed = false; - ActiveShuttle.GetComponent().DoHit(DistanceAtBeat(caller.startBeat + caller.timer)); + ActiveShuttle.DoHit(DistanceAtBeat(caller.startBeat + caller.timer)); string distanceString = DistanceAtBeat(caller.startBeat + caller.timer) switch { DistanceSound.close => "Close", @@ -1414,7 +1414,7 @@ namespace HeavenStudio.Games if (state >= 1 || state <= -1) { - ActiveShuttle.GetComponent().DoThrough(); + ActiveShuttle.DoThrough(); hasMissed = true; shuttleActive = false; } @@ -1422,7 +1422,7 @@ namespace HeavenStudio.Games { ReturnObject(Conductor.instance.songPositionInBeatsAsDouble, caller.startBeat + caller.timer + 2f, true); hasMissed = false; - ActiveShuttle.GetComponent().DoHit(DistanceAtBeat(caller.startBeat + caller.timer)); + ActiveShuttle.DoHit(DistanceAtBeat(caller.startBeat + caller.timer)); string distanceString = DistanceAtBeat(caller.startBeat + caller.timer) switch { @@ -1454,7 +1454,7 @@ namespace HeavenStudio.Games public void RallyOnMiss(PlayerActionEvent caller) { - ActiveShuttle.GetComponent().DoThrough(); + ActiveShuttle.DoThrough(); hasMissed = true; shuttleActive = false; ActiveShuttle = null;