private void OnGameOver()
 {
     GameIsOver?.Invoke(this, new SpaceShipEventArgs()
     {
         LevelReached = _currentLevel, SpaceShipHP = _goodSpaceShipHitPoints
     });
 }
Example #2
0
    public void ReactTo_OffLimitWallsCollision()
    {
        if (heroState != HeroStates.DEAD)
        {
            return;
        }

        // Change state
        heroState = HeroStates.GAME_OVER;

        // ----- EVENT -----

        // Fire event: Hero is dead
        GameIsOver?.Invoke();
    }
Example #3
0
 private void endOfMoveLogic()
 {
     switchTurn();
     if (GameLogic.IsGameOver(r_Board))
     {
         if (GameIsOver != null)
         {
             GameIsOver.Invoke();
         }
     }
     else
     {
         setPossibleMoves();
     }
 }
Example #4
0
 public void GameOver()
 {
     GameIsOver?.Invoke();
 }
Example #5
0
 protected virtual void OnGameIsOver(string i_WinnerName)
 {
     GameIsOver?.Invoke(i_WinnerName);
 }
Example #6
0
 protected virtual void OnGameIsOver(EventArgs e)
 {
     GameIsOver?.Invoke(this, e);
 }