Пример #1
0
        //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        //                                                                                                                        OnCollision()
        //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        public void OnCollision(GameObject other)
        {
            if (other is Hitbox_Fist && Globals.playerIsAttacking == true)
            {
                LateDestroy();
                LateRemove();

                Enemy theEnemyParent = (Enemy)parent;

                theEnemyParent.hit();
            }
        }