Exemplo n.º 1
0
    private void OnEnter(GameObject otherCollider)
    {
        IDamage damage = otherCollider.GetComponent <IDamage>();

        if (damage != null && !damage.GetSafe().Contains(this))
        {
            TakeDamage(damage.GetDamage());
        }
    }