public override void UpDate() { switch (this.nowscene) { case KeyItemMenu.SCENE.fadein: if (this.Alpha > 0) { this.Alpha -= 51; break; } this.nowscene = KeyItemMenu.SCENE.select; break; case KeyItemMenu.SCENE.select: this.Control(); this.FlamePlus(); if (this.frame % 10 == 0) { ++this.cursolanime; } if (this.cursolanime < 3) { break; } this.cursolanime = 0; break; case KeyItemMenu.SCENE.fadeout: if (this.Alpha < byte.MaxValue) { this.Alpha += 51; break; } this.topmenu.Return(); break; } }
private void Control() { if (this.infonext && Input.IsPress(Button._A)) { ++this.infopage; this.infonext = this.keyitems[this.select].info.Count > 3 + 3 * this.infopage; this.sound.PlaySE(SoundEffect.movecursol); } if (Input.IsPress(Button._B)) { this.sound.PlaySE(SoundEffect.cancel); this.nowscene = KeyItemMenu.SCENE.fadeout; } if (this.waittime <= 0) { if (Input.IsPush(Button.Up) && this.select > 1) { if (this.cursol > 1) { this.cursol -= 2; } else { --this.top; } this.sound.PlaySE(SoundEffect.movecursol); this.waittime = Input.IsPress(Button.Up) ? 10 : 4; this.ChangeItem(); } if (Input.IsPush(Button.Down) && this.select < this.keyitems.Count - 2) { if (this.cursol < 8) { this.cursol += 2; } else { ++this.top; } this.sound.PlaySE(SoundEffect.movecursol); this.waittime = Input.IsPress(Button.Down) ? 10 : 4; this.ChangeItem(); } if (Input.IsPush(Button.Left) && this.select > 0) { if (this.cursol > 0) { --this.cursol; } else { --this.top; ++this.cursol; } this.sound.PlaySE(SoundEffect.movecursol); this.waittime = Input.IsPress(Button.Left) ? 10 : 4; this.ChangeItem(); } if (!Input.IsPush(Button.Right) || this.select >= this.keyitems.Count - 1) { return; } if (this.cursol < 9) { ++this.cursol; } else { ++this.top; --this.cursol; } this.sound.PlaySE(SoundEffect.movecursol); this.waittime = Input.IsPress(Button.Right) ? 10 : 4; this.ChangeItem(); } else { --this.waittime; } }