示例#1
0
        internal override void Process()
        {
            if (this.Need)//必要なら
            {
                if (this.menu == null)
                {
                    //数取得
                    int mn = this.tree.Header.Count + this.tree.Tree.Count;


                    /*押されているかつ、最初か最後でないなら*/

                    if (Key.Instance.GetKeyUP(KeyComfig.MENU_DOWN))
                    {
                        if (this.index + 1 != mn)
                        {
                            this.index++;
                        }
                    }
                    else if (Key.Instance.GetKeyUP(KeyComfig.MENU_UP))
                    {
                        if (this.index != 0)
                        {
                            this.index--;
                        }
                    }

                    if (Key.Instance.GetKeyUP(KeyComfig.MENU_OK) && this.tree.Header.Count + this.tree.Tree.Count != 0)
                    {
                        //ミッションなら
                        if (this.index < this.tree.Header.Count)
                        {
                            this.Need     = false;
                            this.Decision = true;
                            this.Header   = this.tree.Header[this.index];
                        }
                        else//カテゴリなら
                        {
                            this.menu = new TreeMenu <THeader>(this.msg, this.tree.Tree[this.index - this.tree.Header.Count]);
                        }

                        SE.Instance.Play(DXAudio.Instance.OK);
                    }

                    else if (Key.Instance.GetKeyUP(KeyComfig.MENU_BACK))//戻る
                    {
                        this.Need     = false;
                        this.Decision = false;
                        SE.Instance.Play(DXAudio.Instance.Cancel);
                    }
                }
                else
                {
                    this.menu.Process();
                    if (!this.menu.Need)
                    {
                        if (this.menu.Decision)
                        {
                            this.Need     = false;
                            this.Decision = true;
                            this.Header   = this.menu.Header;
                            this.menu     = null;
                        }
                        else
                        {
                            this.menu = null;
                        }
                    }
                }
            }
        }
示例#2
0
 /// <summary>
 /// タイトル画面、ゲーム画面等を場合に応じて呼び出します
 /// </summary>
 private static void Update()
 {
     if (Program.title != null)//タイトル画面なら
     {
         Program.title.Process();
         if (count % Config.Instance.FrameSkip == 0)
         {
             Program.title.Draw();
         }
         if (!Program.title.Need)
         {
             Program.title         = null;
             Program.equipmentMenu = new TreeMenu <PlayerHeader>(Program.ZIKI_MSG, Script.PlayerH);
         }
     }
     else if (Program.equipmentMenu != null)//装備選択画面なら
     {
         Program.equipmentMenu.Process();
         if (count % Config.Instance.FrameSkip == 0)
         {
             Program.equipmentMenu.Draw();
         }
         if (!Program.equipmentMenu.Need)
         {
             Program.equipment     = Program.equipmentMenu.Header;
             Program.equipmentMenu = null;
             Program.missionMenu   = new TreeMenu <EnemyHeader>("敵を選択して下さい。", Script.EnemyH);
         }
     }
     else if (Program.missionMenu != null)//敵選択画面なら
     {
         Program.missionMenu.Process();
         if (count % Config.Instance.FrameSkip == 0)
         {
             Program.missionMenu.Draw();
         }
         if (!Program.missionMenu.Need)
         {
             if (Program.missionMenu.Decision)
             {
                 Program.missionData = Program.missionMenu.Header;//ミッションデータ取得
                 Program.missionMenu = null;
                 Program.game        = new Game(Program.missionData, Program.equipment);
             }
             else
             {
                 Program.missionMenu   = null;
                 Program.equipmentMenu = new TreeMenu <PlayerHeader>(Program.ZIKI_MSG, Script.PlayerH);
             }
         }
     }
     else//ゲーム画面なら
     {
         Program.game.Process();
         if (count % Config.Instance.FrameSkip == 0)
         {
             Program.game.Draw();
         }
         if (!Program.game.Need)
         {
             DX.SetBackgroundColor(0, 0, 0);
             Program.game          = null;
             Program.equipmentMenu = new TreeMenu <PlayerHeader>(Program.ZIKI_MSG, Script.PlayerH);
         }
     }
     count++;
 }