private IEnumerator Retaliate(LifeSystem targetLifeSystem, CombatSystem targetCombatSystem) { yield return(new WaitForSeconds(2)); if (!lifeSystem.IsDead) { transform.LookAt(targetLifeSystem.transform, Vector3.up); characterMotor.OnAttack(); combatSystem.Attack(targetLifeSystem); targetLifeSystem.GetComponent <CharacterMotor>().OnHit(); yield return(new WaitForSeconds(2)); } if (!targetLifeSystem.IsDead) { var targetDestination = GridHelper.GetNearestTile(transform.position + (targetLifeSystem.transform.position - transform.position).normalized * 5); targetLifeSystem.GetComponent <CharacterMotor>().setDestination(targetDestination); } targetCombatSystem.OnConbatFinished(); }