public IEnumerator DealDamageToPlayer(int pDamage) { string Result; CoroutineData tCoroutine = new CoroutineData(this, Player.AttackedForValue(pDamage)); yield return(tCoroutine.coroutine); Result = null; Result = (string)tCoroutine.result; yield return(new WaitUntil(() => Result == "Finished")); yield return("Finished"); }
public override IEnumerator ResolveEffect() { int tDamage = mMatchController.EnemyActing.Damage; Debug.Log("Enemy damage: " + tDamage); PlayerCharacterController tPlayer = mMatchController.Player; string Result; CoroutineData AttackCoroutine = new CoroutineData(mMatchController, tPlayer.AttackedForValue(tDamage)); yield return(AttackCoroutine.coroutine); Result = null; Result = (string)AttackCoroutine.result; yield return(new WaitUntil(() => Result == "Finished")); yield return("Finished"); }