private void OnGameOver() { GameIsOver?.Invoke(this, new SpaceShipEventArgs() { LevelReached = _currentLevel, SpaceShipHP = _goodSpaceShipHitPoints }); }
public void ReactTo_OffLimitWallsCollision() { if (heroState != HeroStates.DEAD) { return; } // Change state heroState = HeroStates.GAME_OVER; // ----- EVENT ----- // Fire event: Hero is dead GameIsOver?.Invoke(); }
private void endOfMoveLogic() { switchTurn(); if (GameLogic.IsGameOver(r_Board)) { if (GameIsOver != null) { GameIsOver.Invoke(); } } else { setPossibleMoves(); } }
public void GameOver() { GameIsOver?.Invoke(); }
protected virtual void OnGameIsOver(string i_WinnerName) { GameIsOver?.Invoke(i_WinnerName); }
protected virtual void OnGameIsOver(EventArgs e) { GameIsOver?.Invoke(this, e); }