Ejemplo n.º 1
0
    private void OnTriggerEnter(Collider other)
    {
        // get colliding projectile
        ProjectileController collidingProjectile = other.GetComponent <ProjectileController>();

        // if projectile found
        if (collidingProjectile != null)
        {
            // if this ability's caster can be hurt by the colliding projectile
            if (_casterCharData.factionReputation.DoesReputationAllowHarm(
                    collidingProjectile.CharOwnerData.factionReputation))
            {
                // despawn the colliding projectile
                collidingProjectile.DespawnObject();
            }
        }
    }