public Coroutine UnitHeal(Unit source, Unit target) { UnitUI sourceUI = FindUnitUI(source); UnitUI targetUI = FindUnitUI(target); return(StartCoroutine(ParallelCoroutine( () => sourceUI.AttackMove((targetUI.transform.position - sourceUI.transform.position).normalized), () => targetUI.HealEffect() ))); }
public Coroutine UnitDamage(Unit source, Unit target, int damageAmount) { UnitUI sourceUI = FindUnitUI(source); UnitUI targetUI = FindUnitUI(target); targetUI.RenderUnit(); return(StartCoroutine(ParallelCoroutine( () => sourceUI.AttackMove(AttackDirection(Lane.GetLaneSidePosOf(source, Driver.instance.gameManager.Lanes).Item2)), () => damageTextManager.DamageTextPopup(targetUI.transform.position, $"-{damageAmount}") ))); }