public SubChip(IAudioEngine s, Player p, TopMenu t, EventManager e, SaveData save) : base(s, p, t, save) { this.eventmanager = e; this.Alpha = byte.MaxValue; this.info = SubChip.InfoSet(this.cursol); this.printHP = this.savedata.HPnow; }
private void Control() { if (Input.IsPress(Button._A)) { if (!this.savedata.isJackedIn) { this.eventmanager.events.Clear(); this.sound.PlaySE(SoundEffect.error); this.eventmanager.AddEvent(new OpenMassageWindow(this.sound, this.eventmanager)); var dialogue = ShanghaiEXE.Translate("SubChip.InvalidRealWorldDialogue1"); this.eventmanager.AddEvent(new CommandMessage(this.sound, this.eventmanager, dialogue[0], dialogue[1], dialogue[2], dialogue.Face, this.savedata)); this.eventmanager.AddEvent(new CloseMassageWindow(this.sound, this.eventmanager)); } else if (this.savedata.haveSubChis[this.cursol] == 0) { this.eventmanager.events.Clear(); this.sound.PlaySE(SoundEffect.error); this.eventmanager.AddEvent(new OpenMassageWindow(this.sound, this.eventmanager)); var dialogue = ShanghaiEXE.Translate("SubChip.InvalidOutOfSubChipsDialogue1"); this.eventmanager.AddEvent(new CommandMessage(this.sound, this.eventmanager, dialogue[0], dialogue[1], dialogue[2], dialogue.Face, this.savedata)); this.eventmanager.AddEvent(new CloseMassageWindow(this.sound, this.eventmanager)); } else if (this.cursol < 2 && this.savedata.HPMax == this.savedata.HPnow) { this.eventmanager.events.Clear(); this.sound.PlaySE(SoundEffect.error); this.eventmanager.AddEvent(new OpenMassageWindow(this.sound, this.eventmanager)); var dialogue = ShanghaiEXE.Translate("SubChip.InvalidFullHPDialogue1"); this.eventmanager.AddEvent(new CommandMessage(this.sound, this.eventmanager, dialogue[0], dialogue[1], dialogue[2], dialogue.Face, this.savedata)); this.eventmanager.AddEvent(new CloseMassageWindow(this.sound, this.eventmanager)); } else if (this.cursol >= 2 && this.cursol <= 5 && this.savedata.runSubChips[this.cursol - 2]) { this.eventmanager.events.Clear(); this.sound.PlaySE(SoundEffect.error); this.eventmanager.AddEvent(new OpenMassageWindow(this.sound, this.eventmanager)); var dialogue = ShanghaiEXE.Translate("SubChip.InvalidAlreadyInUseDialogue1"); this.eventmanager.AddEvent(new CommandMessage(this.sound, this.eventmanager, dialogue[0], dialogue[1], dialogue[2], dialogue.Face, this.savedata)); this.eventmanager.AddEvent(new CloseMassageWindow(this.sound, this.eventmanager)); } else if (this.cursol == 6 && !this.EventCheck()) { this.eventmanager.events.Clear(); this.sound.PlaySE(SoundEffect.error); this.eventmanager.AddEvent(new OpenMassageWindow(this.sound, this.eventmanager)); var dialogue = ShanghaiEXE.Translate("SubChip.InvalidNothingToUnlockDialogue1"); this.eventmanager.AddEvent(new CommandMessage(this.sound, this.eventmanager, dialogue[0], dialogue[1], dialogue[2], dialogue.Face, this.savedata)); this.eventmanager.AddEvent(new CloseMassageWindow(this.sound, this.eventmanager)); } else { this.eventmanager.events.Clear(); if (this.cursol == 6) { this.savedata.selectQuestion = 0; } else { this.eventmanager.AddEvent(new OpenMassageWindow(this.sound, this.eventmanager)); var questionDialogue = ShanghaiEXE.Translate("SubChip.UseQuestion"); var options = ShanghaiEXE.Translate("SubChip.UseOptions"); this.eventmanager.AddEvent(new Question(this.sound, this.eventmanager, questionDialogue[0], questionDialogue[1], options[0], options[1], false, true, FACE.Shanghai.ToFaceId(), this.savedata)); this.eventmanager.AddEvent(new CloseMassageWindow(this.sound, this.eventmanager)); } this.question = true; } } if (Input.IsPress(Button._B)) { this.sound.PlaySE(SoundEffect.cancel); this.nowscene = SubChip.SCENE.fadeout; } if (Input.IsPress(Button.Up)) { this.sound.PlaySE(SoundEffect.movecursol); --this.Cursol; this.info = SubChip.InfoSet(this.Cursol); } if (!Input.IsPress(Button.Down)) { return; } this.sound.PlaySE(SoundEffect.movecursol); ++this.Cursol; this.info = SubChip.InfoSet(this.Cursol); }