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,12 +5,14 @@ public class Ratbot : MonoBehaviour
public float moveSpeed;
public float damageStrength;
public float damageTimeoutSeconds;
GameObject player;
float lastDamageTime;
GameState gameState;
GameObject player;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
player = GameObject.FindGameObjectWithTag("Player");
gameState = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameState>();
}
// Update is called once per frame