public override void UpDate() { switch (this.nowscene) { case MailMenu.SCENE.fadein: if (this.Alpha > 0) { this.Alpha -= 51; break; } this.nowscene = MailMenu.SCENE.select; break; case MailMenu.SCENE.select: if (this.eventmanager.playevent) { this.eventmanager.UpDate(); } else { this.Control(); } this.FlamePlus(); if (this.frame % 10 == 0) { ++this.cursolanime; this.iconanime = !this.iconanime; } if (this.cursolanime < 3) { break; } this.cursolanime = 0; break; case MailMenu.SCENE.fadeout: if (this.Alpha < byte.MaxValue) { this.Alpha += 51; break; } this.topmenu.Return(); break; } }
private void Control() { if (Input.IsPress(Button._A)) { this.sound.PlaySE(SoundEffect.decide); this.eventmanager = this.mails[this.select].MakeEvent(this.sound); if (!this.mails[this.select].read) { this.mails[this.select].read = true; this.savedata.mailread[this.savedata.mailread.Count - this.select - 1] = true; } } if (Input.IsPress(Button._B)) { this.sound.PlaySE(SoundEffect.cancel); this.nowscene = MailMenu.SCENE.fadeout; } if (this.waittime <= 0) { int num1 = 4; if (Input.IsPush(Button.Up) && this.select > 0) { if (this.cursol > 0) { --this.cursol; } else { --this.top; } this.sound.PlaySE(SoundEffect.movecursol); this.waittime = Input.IsPress(Button.Up) ? 10 : 4; } if (Input.IsPush(Button.Down)) { if (this.select >= this.mails.Count - 1) { return; } if (this.cursol < num1) { ++this.cursol; } else { ++this.top; } this.sound.PlaySE(SoundEffect.movecursol); this.waittime = Input.IsPress(Button.Down) ? 10 : 4; } else if (Input.IsPush(Button._R)) { int num2 = this.savedata.mail.Count - (num1 + 1) - this.top; if (num2 > num1) { num2 = num1; } if (num2 > 0) { this.sound.PlaySE(SoundEffect.movecursol); this.top += num2; } this.waittime = Input.IsPress(Button._R) ? 10 : 4; } else { if (!Input.IsPush(Button._L)) { return; } int num2 = this.top; if (num2 > num1) { num2 = num1; } if (num2 > 0) { this.sound.PlaySE(SoundEffect.movecursol); this.top -= num2; } this.waittime = Input.IsPress(Button._L) ? 10 : 4; } } else { --this.waittime; } }