public void Destroy() { this.LevelReady = false; if (this.Resize.CBody != null) { this.Resize.CBody.World.Remove(this.Resize.CBody); } if (this.Music.CBody != null) { this.Music.CBody.World.Remove(this.Music.CBody); } if (this.Home.CBody != null) { this.Home.CBody.World.Remove(this.Home.CBody); } if (this.Reload.CBody != null) { this.Reload.CBody.World.Remove(this.Reload.CBody); } if (this.BackShow && this.Back.CBody != null) { this.Back.CBody.World.Remove(this.Back.CBody); } this.Home = null; this.Resize = null; this.Reload = null; this.Back = null; this.UI = new List <GameObject>(); }
public void Start(ContentManager Content, MouseManager Mouse, ScreemController ScreemController) { this.Content = Content; this.Mouse = Mouse; this.Screem = ScreemController; if (this.ReloadShow) { this.Reload = new Reload(); this.Reload.Start(Content, World, Mouse, ScreemController); this.UI.Add(this.Reload); } if (this.MusicShow) { if (this.Music == null) { this.Music = new Music(); } this.Music.GameManager = this.GameManager; this.Music.Hud = this; this.Music.Start(Content, World, Mouse, ScreemController); this.UI.Add(this.Music); } if (this.ResizeShow && this.Resize == null) { this.Resize = new Resize(); this.Resize.Start(Content, World, Mouse, ScreemController); this.UI.Add(this.Resize); } if (this.BackShow) { if (this.Back == null) { this.Back = new BackBTN(); } this.Back.Start(Content, World, Mouse, ScreemController); this.UI.Add(this.Back); } if (this.HomeShow) { this.Home = new Home(); this.Home.GameManager = this.GameManager; this.Home.Hud = this; this.Home.Start(Content, World, Mouse, ScreemController); this.UI.Add(this.Home); } this.SetBackgroundColor = Color.Transparent; this.LevelReady = true; }