public override void Destroy() { base.Destroy(); FlatRedBall.SpriteManager.RemoveDrawableBatch(ScoreboardGum); FlatRedBall.FlatRedBallServices.GraphicsOptions.SizeOrOrientationChanged -= ScoreboardGum.HandleResolutionChanged; ScoreboardGum = null; if (LivesValue != null) { LivesValue.RemoveFromManagers(); } if (ScoreValue != null) { ScoreValue.RemoveFromManagers(); } if (TimerValue != null) { TimerValue.RemoveFromManagers(); } if (LivesContainer != null) { LivesContainer.RemoveFromManagers(); } if (ScoreboardGumRuntime != null) { ScoreboardGumRuntime.RemoveFromManagers(); } if (DifficultyValue != null) { DifficultyValue.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(); }