mirror of
https://github.com/ryzij/Cube-Tower-Defense.git
synced 2026-07-14 01:56:57 +00:00
Изменил переключение GameState, когда путь построен
This commit is contained in:
@@ -11,7 +11,6 @@ public class GameManager : MonoBehaviour
|
||||
}
|
||||
|
||||
[SerializeField] private Level[] _levels;
|
||||
[SerializeField] private SandPathBuildService _pathBuildService;
|
||||
[SerializeField] private UnityEvent<GameState> _onStateChanged;
|
||||
[SerializeField] private UnityEvent<OnLevelChangedEventArgs> _onLevelChanged;
|
||||
|
||||
@@ -44,20 +43,6 @@ public class GameManager : MonoBehaviour
|
||||
public int CurrentLevel => _currentLvlIndex + 1;
|
||||
public int TotalLevels => _levels.Length;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
_pathBuildService.OnBuildComplete += OnBuildComplete;
|
||||
}
|
||||
private void OnDisable()
|
||||
{
|
||||
_pathBuildService.OnBuildComplete -= OnBuildComplete;
|
||||
}
|
||||
|
||||
private void OnBuildComplete()
|
||||
{
|
||||
CurrentState = GameState.BuildingTurrets;
|
||||
}
|
||||
|
||||
public void NextLevel()
|
||||
{
|
||||
_currentLvlIndex = (_currentLvlIndex + 1) % _levels.Length;
|
||||
|
||||
Reference in New Issue
Block a user