Exemplo n.º 1
0
 private void Control()
 {
     if (Input.IsPress(Button._A))
     {
         this.MessageMake();
     }
     else if (Input.IsPress(Button._B))
     {
         this.sound.PlaySE(SoundEffect.cancel);
         this.nowscene = QuestSelect.SCENE.fadeout;
     }
     else if (this.waittime <= 0)
     {
         if (Input.IsPush(Button.Up))
         {
             if (this.Select <= 0)
             {
                 return;
             }
             if (this.cursol > 0)
             {
                 --this.cursol;
             }
             else
             {
                 --this.top;
             }
             this.sound.PlaySE(SoundEffect.movecursol);
             this.waittime = Input.IsPress(Button.Up) ? 10 : 4;
         }
         else
         {
             if (!Input.IsPush(Button.Down) || this.Select >= this.questlist.Count - 1)
             {
                 return;
             }
             if (this.cursol < 7)
             {
                 ++this.cursol;
             }
             else
             {
                 ++this.top;
             }
             this.sound.PlaySE(SoundEffect.movecursol);
             this.waittime = Input.IsPress(Button.Down) ? 10 : 4;
         }
     }
     else
     {
         --this.waittime;
     }
 }
Exemplo n.º 2
0
        public override void Update()
        {
            switch (this.nowscene)
            {
            case QuestSelect.SCENE.fadein:
                if (!this.shopmode)
                {
                    this.alpha += 51;
                    if (this.alpha >= byte.MaxValue)
                    {
                        this.alpha    = byte.MaxValue;
                        this.shopmode = true;
                        break;
                    }
                    break;
                }
                this.alpha -= 51;
                if (this.alpha <= 0)
                {
                    this.savedata.selectQuestion = 1;
                    this.nowscene = QuestSelect.SCENE.select;
                }
                break;

            case QuestSelect.SCENE.select:
                if (this.eventmanager.playevent)
                {
                    this.eventmanager.UpDate();
                    break;
                }
                if (this.savedata.selectQuestion == 0)
                {
                    this.savedata.ValList[11]    = this.questlistNumber[this.Select];
                    this.savedata.ValList[4]     = this.questHint[this.questlistNumber[this.Select]];
                    this.savedata.selectQuestion = 1;
                }
                else
                {
                    this.Control();
                }
                break;

            case QuestSelect.SCENE.fadeout:
                if (this.shopmode)
                {
                    this.alpha += 51;
                    if (this.alpha >= byte.MaxValue)
                    {
                        this.alpha    = byte.MaxValue;
                        this.shopmode = false;
                        break;
                    }
                    break;
                }
                this.alpha -= 51;
                if (this.alpha <= 0)
                {
                    this.nowscene = QuestSelect.SCENE.fadein;
                    this.cursol   = 0;
                    this.top      = 0;
                    this.EndCommand();
                }
                break;
            }
            this.FlameControl(10);
            if (!this.moveflame)
            {
                return;
            }
            ++this.cursolanime;
            if (this.cursolanime >= 3)
            {
                this.cursolanime = 0;
            }
        }