public GameplayOutput(Vector2 pPosition, MainGame pMainGame, MapFile mapFile, Hero pPlayer, SceneGameplay pCurrentScene) { Position = pPosition; mainGame = pMainGame; currentScene = pCurrentScene; currentMapFile = mapFile; player = pPlayer; //Item Inventory Texture ItemTexture.Populate(mainGame); //Item Data ItemData.PopulateData(); //Overlay OverlayActive = false; overlayOptionMenu = new OverlayOptionMenu(new Vector2(MainGame.ScreenWidth / 2 - OverlayOptionMenu.Width / 2, (int)(MainGame.ScreenHeight / 2) - OverlayOptionMenu.Height / 2), mainGame, currentScene); //Inventory InventoryManager = new InventoryManager(); InventoryManager.AddObject("SCYTHE", 1); InventoryManager.AddObject("BASEBATON", 1); //ItemBar float itemBarX = MainGame.ScreenWidth / 2 - 520 / 2; float itemBarY = MainGame.ScreenHeight - MainGame.ScreenHeight / 6 + 50 / 2; itemBar = new ItemBar(InventoryManager, new Vector2(itemBarX, itemBarY)); itemBar.Populate(); //InvetoryOverlay float InventoryposX = MainGame.ScreenWidth / 2 - 600 / 2; float InventoryposY = MainGame.ScreenHeight / 2 - 350 / 2; overlayInventory = new OverlayInventory(mainGame, InventoryManager, new Vector2(InventoryposX, InventoryposY), itemBar); overlayInventory.Populate(); //player player.inventoryManager = InventoryManager; player.overlayInventory = overlayInventory; //Time timePosition = new Vector2(MainGame.ScreenWidth - 70, 5); //Fps Fps_CountPosition = new Vector2(0, 0); //Interact interactString = "Press R"; IsInteracting = false; interactPosition = new Vector2(0, 0); //SpellSelector spellSelector = new HeroSpellSelector(player); }
public OverlayInventory(MainGame pMainGame, InventoryManager pInventory, Vector2 pPosition, ItemBar pItemBar) : base(pMainGame) { isActive = false; Position = pPosition; inventoryManager = pInventory; itemBar = pItemBar; background = mainGame.Content.Load <Texture2D>("GUI/background"); textureSlot = mainGame.Content.Load <Texture2D>("GUI/slot"); textureSlotSelect = mainGame.Content.Load <Texture2D>("GUI/slotSelected"); lstIcons = new List <InventoryIcon>(); lstSlots = new List <Rectangle>(); color = new Color(255, 255, 255, 0.95f); }