public void ExitGame(MenuElement element) { //TEMP:Clear the chunk manager - will need to save on exit ChunkManager.Dispose(); GameHUDScreen.Dispose(); ScreenManager.GetInstance().Screens.Clear(); //NOTE: This is temporary, will need to wire the exit event to the GameManager to properly handle exiting DebugScreen.GetInstance().RemoveDebugListing("Graph Size: "); ScreenManager.GetInstance().addScreen(new BackgroundScreen()); ScreenManager.GetInstance().addScreen(new MainMenuScreen()); }
public InventoryItemView(InventoryItem item, Vector2 positionRelative, Vector2 parentPosition, InventorySlot owner) { RequestAddTooltipEvent += GameHUDScreen.GetInstance().AddTooltip; RequestRemoveTooltipEvent += GameHUDScreen.GetInstance().RemoveTooltip; _owner = owner; _positionRelative = positionRelative; _positionAbsolute = positionRelative + parentPosition; _releasedPosition = new Vector2(_positionAbsolute.X, _positionAbsolute.Y); _inventoryItem = item; _icon = ScreenManager.GetInstance().ContentManager.Load <Texture2D>(_inventoryItem.IconLocation); // _icon = ScreenManager.GetInstance().ContentManager.Load<Texture2D>("Textures\\UI\\TestIcon"); _boundingBox = new Rectangle((int)_positionAbsolute.X, (int)_positionAbsolute.Y, 40, 40); }