public override void Destroy() { base.Destroy(); FlatRedBall.SpriteManager.RemoveDrawableBatch(MainMenuGum); FlatRedBall.FlatRedBallServices.GraphicsOptions.SizeOrOrientationChanged -= MainMenuGum.HandleResolutionChanged; MainMenuGum = null; if (ButtonInstance != null) { ButtonInstance.RemoveFromManagers(); } FlatRedBall.Math.Collision.CollisionManager.Self.Relationships.Clear(); CustomDestroy(); }
public override void Destroy() { base.Destroy(); FlatRedBall.SpriteManager.RemoveDrawableBatch(GameOverGum); FlatRedBall.FlatRedBallServices.GraphicsOptions.SizeOrOrientationChanged -= GameOverGum.HandleResolutionChanged; GameOverGum = null; if (FinalScoreValue != null) { FinalScoreValue.RemoveFromManagers(); } if (PlayAgainButton != null) { PlayAgainButton.RemoveFromManagers(); } FlatRedBall.Math.Collision.CollisionManager.Self.Relationships.Clear(); CustomDestroy(); }
public override void Destroy() { base.Destroy(); FlatRedBall.SpriteManager.RemoveDrawableBatch(MiniGameBaseGum); FlatRedBall.FlatRedBallServices.GraphicsOptions.SizeOrOrientationChanged -= MiniGameBaseGum.HandleResolutionChanged; MiniGameBaseGum = null; if (TimerValue != null) { TimerValue.RemoveFromManagers(); } if (InstructionsTimeLeftText != null) { InstructionsTimeLeftText.RemoveFromManagers(); } if (InstructionsDisplayedText != null) { InstructionsDisplayedText.RemoveFromManagers(); } if (GameTimeLeft != null) { GameTimeLeft.RemoveFromManagers(); } if (ButtonInstance != null) { ButtonInstance.RemoveFromManagers(); } if (MiniGameBaseGumRuntime != null) { MiniGameBaseGumRuntime.RemoveFromManagers(); } if (ContentBlocker != null) { ContentBlocker.RemoveFromManagers(); } FlatRedBall.Math.Collision.CollisionManager.Self.Relationships.Clear(); CustomDestroy(); }