//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- // OnCollision() //---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- public void OnCollision(GameObject other) { if (other is Hitbox_Fist && Globals.playerIsAttacking == true) { LateDestroy(); LateRemove(); Enemy theEnemyParent = (Enemy)parent; theEnemyParent.hit(); } }