private void LateUpdate() { if (_waves == null) { _waves = FindObjectOfType <EnemySpawner>().Waves; } coinLabel.text = _playerState.Coin.ToString(); lifeLabel.text = _playerState.Health.ToString(); if (_playerState.Health < 0) { lifeLabel.text = "0"; } waveLabel.text = $"{_waves.NumberOfStartedWaves()} / {_waves.NumberOfTotalWaves()}"; }
public void ReadWaves(string filePath) { _wave = SpawnParser.Parse(filePath, this); Debug.Log($"Number of waves: {_wave.NumberOfTotalWaves()}"); }