public static void Apply(GameObject target) { EtherealStatus targetStatus = target.GetComponent <EtherealStatus>(); if (targetStatus != null) { targetStatus.Apply(); } }
private void Hit(GameObject target) { if (target != null) { Hurtbox otherHurtbox = target.GetComponent <Hurtbox>(); if (otherHurtbox != null && !sourceTeam.IsAgainst(otherHurtbox.Team)) { otherHurtbox.GetHealed(healAmount); onHeal.Invoke(); if (makeTargetEthereal) { EtherealStatus.Apply(target); } if (destroySelfOnHit) { Destroy(gameObject); } } } }