Merge pull request #57 from Slaith12/main

Fixed space soccer ball spawning when it shouldn't be
This commit is contained in:
Jenny Crowe 2022-03-18 18:42:31 -07:00 committed by GitHub
commit 41f572b692
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,7 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
{ {
public class Ball : MonoBehaviour public class Ball : MonoBehaviour
{ {
public enum State { Dispensing, Kicked, HighKicked, Toe }; public enum State { None, Dispensing, Kicked, HighKicked, Toe };
[Header("Components")] [Header("Components")]
[HideInInspector] public Kicker kicker; [HideInInspector] public Kicker kicker;
[SerializeField] private GameObject holder; [SerializeField] private GameObject holder;
@ -95,7 +95,7 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
} }
} }
} }
if(state == 0) //if the for loop didn't set the state if(state == 0) //if the for loop didn't set the state, i.e. all the high kicks happen before the point we start at.
{ {
//Debug.Log("Defaulting to kicked state"); //Debug.Log("Defaulting to kicked state");
state = State.Kicked; state = State.Kicked;