public override void Destroy() { base.Destroy(); PlatformerLevel1.Destroy(); PlatformerLevel1 = null; if (PlayerInstance != null) { PlayerInstance.Destroy(); PlayerInstance.Detach(); } CustomDestroy(); }
public override void Destroy() { base.Destroy(); HealthPointFactory.Destroy(); PlatformerLevel1.Destroy(); PlatformerLevel1 = null; PositionedObjectListInstance.MakeOneWay(); if (PlayerInstance != null) { PlayerInstance.Destroy(); PlayerInstance.Detach(); } for (int i = PositionedObjectListInstance.Count - 1; i > -1; i--) { PositionedObjectListInstance[i].Destroy(); } PositionedObjectListInstance.MakeTwoWay(); CustomDestroy(); }