Add new GameState

This commit is contained in:
2025-12-18 00:35:27 +08:00
parent 2bd94c8df9
commit a991b5a0ee
2 changed files with 6 additions and 4 deletions

View File

@@ -9,6 +9,7 @@ namespace Enums {
}
public enum GameState {
Setup,
Wait,
Move
}

View File

@@ -36,7 +36,7 @@ namespace Services {
#region Variables
private readonly List<GemPresenter> gemPresenters = new List<GemPresenter>();
private GameState currentState = GameState.Move;
private GameState currentState = GameState.Setup;
#endregion
public GameBoardService(
@@ -91,8 +91,6 @@ namespace Services {
}
SpawnCascade(gemsToSpawn);
this.currentState = GameState.Move;
}
private Gem SetGemAt(Vector2Int position, GemType gemType, bool isBomb = false) {
@@ -314,6 +312,9 @@ namespace Services {
if (i < groups.Count - 1)
await UniTask.Delay(150);
}
if(this.currentState == GameState.Setup)
this.currentState = GameState.Move;
}
private void RemovePresenterFor(GemView gemView) {