protected void OnDeath(CatDeathEventArg arg) { if (RaiseDeath != null) { RaiseDeath(this, arg); } }
private void ResetOnDeath(object sender, CatDeathEventArg arg) { catMoveRef.ResetOnDeath(); int life = catHealth.DecreaseHealth(); this.catDeath = arg.catDeath; if (life >= 0) { ChangeCurrentState(CatState.Reset); } else { this.gameHandler.RequestStateHandler(GameState.GameLost); } }