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(MemoryGameGum); FlatRedBall.FlatRedBallServices.GraphicsOptions.SizeOrOrientationChanged -= MemoryGameGum.HandleResolutionChanged; MemoryGameGum = null; if (CardContainer != null) { CardContainer.RemoveFromManagers(); } FlatRedBall.Math.Collision.CollisionManager.Self.Relationships.Clear(); CustomDestroy(); }