Add GameState to keep track of state and wave #

This commit is contained in:
2024-10-19 20:52:47 -07:00
parent b10d75ac29
commit 7aa325cccc
7 changed files with 95 additions and 182 deletions

View File

@@ -5,9 +5,11 @@ public class Teo : MonoBehaviour
public float health = 100F;
public float moveSpeed = 10F;
Rigidbody2D controller;
GameState gameState;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start() {
controller = GetComponent<Rigidbody2D>();
gameState = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameState>();
}
// Update is called once per frame