internal virtual void Main_Turn(object sender, MainGameWindow.TurnData e) { turns--; if (turns <= 0) { //Delete BaseDelete(); Delete(); } }
private void Main_Turn(object sender, MainGameWindow.TurnData e) { MainGameWindow main = sender as MainGameWindow; if (e.active.Name != player.Name) { return; } //Do effect main.DamagePlayer(damage, DamageType.fire, player); //Handle turn countdown if (turns == null) { return; } turns--; if (turns == 0) { RemoveEffect(main); } }
private void Main_Turn(object sender, MainGameWindow.TurnData e) { MainGameWindow main = sender as MainGameWindow; if (e.active.Name != player.Name) { return; } //Handle turn countdown if (turns == null) { return; } turns--; if (turns == 0) { player.actionPoints.rawMaxValue += strength; player.troop.statuses.Remove(this); main.UpdatePlayerView(); this.main.Turn -= Main_Turn; } }