Пример #1
0
    private void OnTriggerExit(Collider other)
    {
        ResourcePoolMember otherRPM = other.GetComponent <ResourcePoolMember>();

        if (otherRPM != null)
        {
            otherRPM.Despawn();
        }
    }
Пример #2
0
    private void destorySelf()
    {
        ResourcePoolMember rpm = gameObject.GetComponent <ResourcePoolMember>();

        if (rpm != null)
        {
            rpm.Despawn();
        }
        else
        {
            Destroy(gameObject);
        }
    }