public override void Destroy() { base.Destroy(); BulletFactory.Destroy(); EnemyFactory.Destroy(); BulletList.MakeOneWay(); EnemyList.MakeOneWay(); if (BackgroundInstance != null) { BackgroundInstance.Destroy(); BackgroundInstance.Detach(); } if (PlayerInstance != null) { PlayerInstance.Destroy(); PlayerInstance.Detach(); } for (int i = BulletList.Count - 1; i > -1; i--) { BulletList[i].Destroy(); } for (int i = EnemyList.Count - 1; i > -1; i--) { EnemyList[i].Destroy(); } if (ScoreboardInstance != null) { ScoreboardInstance.Destroy(); ScoreboardInstance.Detach(); } BulletList.MakeTwoWay(); EnemyList.MakeTwoWay(); CustomDestroy(); }