Organization of Game Files
Created folder for C# files, player, and enemy so it's a little cleaner...
This commit is contained in:
17
Assets/C# Scripts/UI overlay/WaveIndicator.cs
Normal file
17
Assets/C# Scripts/UI overlay/WaveIndicator.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class WaveIndicator : MonoBehaviour
|
||||
{
|
||||
GameState gameState;
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
gameState = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameState>();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
GetComponent<TMPro.TMP_Text>().text = "Wave: "+gameState.wave;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user