コード例 #1
0
        private DungeonLog logUI;           //LogUI

        public DungeonUI(GameManager gameManager, GameDevice gameDevice)
        {
            popUI  = new DungeonPopUI(gameDevice);
            hintUI = new DungeonHintUI(gameDevice);
            logUI  = new DungeonLog(
                new Vector2(30, Def.WindowDef.WINDOW_HEIGHT - 250),
                new Vector2(350, 170), gameDevice);
        }
コード例 #2
0
        private EquipUI equipUI;                //装備欄UI

        public ItemUI(Vector2 position, EquipUI equipUI, GameManager gameManager, GameDevice gameDevice)
        {
            this.position    = position;
            this.equipUI     = equipUI;
            this.gameManager = gameManager;
            renderer         = gameDevice.Renderer;
            input            = gameDevice.InputState;
            playerItem       = gameManager.PlayerItem;
            itemList         = playerItem.BagList();
            isClick          = false;

            currentPage = 1;

            #region Button
            buttons = new List <Button>();

            InitButton();

            equipButton  = new Button(position + new Vector2(550, 580), 100, 30);
            removeButton = new Button(position + new Vector2(550, 620), 100, 30);
            #endregion

            #region ItemInfo
            currentItem = null;
            itemIndex   = -1;

            hintIndex = -1;
            hintInfo  = new ItemInfoUI(Vector2.Zero, gameManager, gameDevice);
            #endregion

            #region PopUI
            popUI = new DungeonPopUI(gameDevice);
            popUI.SetSize(new Vector2(300, 120));
            popUI.SetAlphaLimit(0.8f);
            popButtons    = new Button[2];
            popButtons[0] = new Button(popUI.Center + new Vector2(-130, 10), 100, 30);
            popButtons[1] = new Button(popUI.Center + new Vector2(20, 10), 100, 30);
            #endregion
        }