//When the object should be removed public override void Destroy() { //Remove the player from the game object index container.removeGameObject(this); //Mark as destroyed Alive = false; }