public SelectorPannel(Screen parent, ContentManager c,GuideBlock g) { this.ParentScreen = parent; this.GameResolution = parent.GameResolution; this.WindowResolution = parent.WindowResolution; this.contentManager = c; this.guide = g; this.IsDrawn = true; this.IsUpdated = true; this.ChildScreens = null; this.state = States.showing; this.currentButton = null; this.Color = new Color(200, 200, 200, 255); this.PositionBox = new Rectangle(0, -300, 1920, 400); addButtons(); }
public LevelEditorScreen(Screen screen) { this.ParentScreen = screen; this.GameResolution = ParentScreen.GameResolution; this.WindowResolution = ParentScreen.WindowResolution; this.ChildScreens = new List<Screen>(); this.IsDrawn = true; this.IsUpdated = true; //this.level = null; this.showGrid = true; //this.blocksPaused = true; this.lightLayer = new LightLayer(this.GameResolution, this.WindowResolution); this.contentManager = new ContentManager(Game1.defaultWorldParameters); this.guide = new GuideBlock(this.contentManager); this.view = new View(new FloatRect(0, 0, this.GameResolution.X, this.GameResolution.Y)); loadMenus(); }
public override void Dispose() { this.ChildScreens.Clear(); this.ChildScreens = null; this.contentManager.Dispose(); this.contentManager = null; this.guide = null; this.lightLayer.Dispose(); this.lightLayer = null; this.ofd.Dispose(); this.ofd = null; this.pannel.Dispose(); this.pannel = null; this.ParentScreen = null; this.pauseMenu.Dispose(); this.pauseMenu = null; this.sfd.Dispose(); this.sfd = null; this.view.Dispose(); this.view = null; }
public override void Dispose() { foreach (SelectorButton b in buttons) b.Dispose(); this.buttons.Clear(); this.buttons = null; this.currentButton = null; this.guide = null; this.ParentScreen = null; }