Example #1
0
        public void Initialize()
        {
            #region 背景
            leftBackLayer = new Window(
                gameDevice,
                new Vector2(60, 60),
                new Vector2(WindowDef.WINDOW_WIDTH / 2 - 200, WindowDef.WINDOW_HEIGHT - 120));
            leftBackLayer.Initialize();
            leftBackLayer.Switch(true);

            rightBackLayer = new Window(
                gameDevice,
                new Vector2(WindowDef.WINDOW_WIDTH / 2 + 140, 60),
                new Vector2(WindowDef.WINDOW_WIDTH / 2 - 200, WindowDef.WINDOW_HEIGHT - 120));
            rightBackLayer.Initialize();
            rightBackLayer.Switch(true);
            #endregion

            isEnd     = false;
            nextState = GuildState.SelectQuestRank;

            #region メインボタン
            currentButton = ButtonEnum.Null;
            float buttonWidth = leftBackLayer.GetWindowSize().X - 20;
            buttons = new Button[(int)ButtonEnum.Null];
            Vector2 position = leftBackLayer.GetLeftUnder() + new Vector2(10, -40);
            buttons[(int)ButtonEnum.戻る] = new Button(position, (int)buttonWidth, 30);
            position = rightBackLayer.GetLeftUnder() + new Vector2(10, -40);
            buttons[(int)ButtonEnum.受注] = new Button(position, (int)buttonWidth, 30);
            #endregion

            InitQuest();

            #region PopUI
            popUI = new DungeonPopUI(gameDevice);
            popUI.SetSize(new Vector2(450, 80));
            popUI.SetAlphaLimit(0.7f);
            popUI.SetTextOffset(Vector2.Zero);
            #endregion

            enemyName = gameManager.EnemyName;
        }
Example #2
0
        public void Initialize()
        {
            #region 背景
            leftBackLayer = new Window(
                gameDevice,
                new Vector2(60, 60),
                new Vector2(WindowDef.WINDOW_WIDTH / 2 - 200, WindowDef.WINDOW_HEIGHT - 120));
            leftBackLayer.Initialize();
            leftBackLayer.Switch(true);

            rightBackLayer = new Window(
                gameDevice,
                new Vector2(WindowDef.WINDOW_WIDTH / 2 + 140, 60),
                new Vector2(WindowDef.WINDOW_WIDTH / 2 - 200, WindowDef.WINDOW_HEIGHT - 120));
            rightBackLayer.Initialize();
            rightBackLayer.Switch(true);
            #endregion

            isEnd     = false;
            nextState = GuildState.Menu;

            #region メインボタン
            currentButton = ButtonEnum.Null;
            float buttonWidth = leftBackLayer.GetWindowSize().X - 20;
            buttons = new Button[(int)ButtonEnum.Null];
            Vector2 position = leftBackLayer.GetLeftUnder() + new Vector2(10, -40);
            buttons[(int)ButtonEnum.戻る] = new Button(position, (int)buttonWidth, 30);
            position = rightBackLayer.GetLeftUnder() + new Vector2(10, -40);
            buttons[(int)ButtonEnum.あきらめる] = new Button(position, (int)buttonWidth / 2 - 10, 30);
            position += new Vector2((int)buttonWidth / 2 + 10, 0);
            buttons[(int)ButtonEnum.報告] = new Button(position, (int)buttonWidth / 2 - 10, 30);
            #endregion

            InitQuest();
            enemyName = gameManager.EnemyName;
        }