private readonly float LIMIT_ALPHA = 0.1f; //背景Alphaの最大値 public PauseUI(GameManager gameManager, GameDevice gameDevice) { this.gameDevice = gameDevice; this.gameManager = gameManager; input = gameDevice.InputState; renderer = gameDevice.Renderer; #region 背景 backLayer = new Window( gameDevice, new Vector2(10, 10), new Vector2(Def.WindowDef.WINDOW_WIDTH - 20, Def.WindowDef.WINDOW_HEIGHT - 20)); backLayer.Initialize(); //初期化 backLayer.SetAlphaLimit(LIMIT_ALPHA); backLayer.Switch(); //開く #endregion #region Parameter parameterUI = new ParameterUI( backLayer.GetRightTop() + new Vector2(-360, 35), //背景レイヤーから相対位置を取る gameManager, gameDevice); #endregion #region アイテム詳細 currentInfo = new ItemInfoUI( backLayer.GetLeftUnder() + new Vector2(55, -102), gameManager, gameDevice); #endregion #region EquipUI equipUI = new EquipUI( backLayer.GetRightUnder() + new Vector2(-360, -250), gameManager, gameDevice); #endregion #region アイテム欄 itemUI = new ItemUI( backLayer.GetOffsetPosition() + new Vector2(45, 20), equipUI, gameManager, gameDevice); equipUI.SetItemUI(itemUI); #endregion #region Quest questUI = new PlayerQuestUI( backLayer.GetCenterTop() + new Vector2(-200, 20), gameManager, gameDevice); #endregion #region Money moneyUI = new MoneyUI( backLayer.GetRightTop() + new Vector2(-360, 280), gameManager, gameDevice); #endregion }
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 }