Esempio n. 1
0
        void OnCollisionEnter2D(Collision2D other)
        {
            var contact = other.contacts[0];

            ComponentUtils.DefaultDealDamage(contact.collider.gameObject, Damage);
            Destroy(gameObject);
        }
Esempio n. 2
0
        void OnCollisionEnter2D(Collision2D other)
        {
            if (other.gameObject == HolderRigidbody.gameObject)
            {
                return;
            }
            var contact = other.contacts[0];

            ComponentUtils.DefaultDealDamage(contact.collider.gameObject, Damage);
        }