public override void FindOpponent() { var dummyOpponent = new Opponent("1234", "I am Dummy"); Debug.Log("Opponnet found!"); startGameSignal.Fire(dummyOpponent); }
private void ChangeGameState(GameStates state, GameOverType gameOverType) { if (_currentState == state) { return; } switch (state) { case GameStates.WaitingToStart: { _currentState = GameStates.WaitingToStart; _waitingToStartSignal.Fire(); break; } case GameStates.Playing: { if (_currentState == GameStates.Paused) { _resumeGameSignal.Fire(); } _currentState = GameStates.Playing; Debug.Log(GameStates.Playing); break; } case GameStates.GameOver: { _currentState = GameStates.GameOver; if (gameOverType == GameOverType.Win) { _gameOverSignal.Fire(GameOverType.Win); } else if (gameOverType == GameOverType.Lose) { _gameOverSignal.Fire(GameOverType.Lose); } break; } case GameStates.StartGame: { _currentState = GameStates.StartGame; Debug.Log(_currentState); _startGameSignal.Fire(); break; } case GameStates.Paused: { _currentState = GameStates.Paused; Debug.Log(_currentState); _gamePausedSignal.Fire(); break; } default: { break; } } }
public void StartGame() { _startGameSignal.Fire(); }