public IBattleState UpdateState(BattleStateHandler battleStateHandler) { if (battleStateHandler.enemy.IsDead()) { return(new EndGameState(true)); } bool animationDone = shotFired && this.fireBall == null; if (animationDone || actionTime <= 0) { if (enemyAction != null) { enemyAction.Apply(battleStateHandler.player); battleStateHandler.battleTextField.text = string.Format("JULIANA takes {0} damage!", enemyAction.damage); } return(new CountdownState(battleStateHandler)); } return(this); }