public override bool HandleInputs(InputState input) { if (input.IsMenuDown()) { selected++; if (selected >= Attacker.Skills.Count) selected = 0; } if (input.IsMenuUp()) { selected--; if (selected < 0) selected = Attacker.Skills.Count - 1; } if (input.IsMenuSelect()) { if(Attacker.MP >= Attacker.Skills[selected].ConsumeMP) GameStateManager.Instance.AddScreen(new CombatVictimSelectScreen(Attacker, Enemies, Group, Attacker.Skills[selected].Name), true, false); } if (input.IsBack()) { GameStateManager.Instance.RemoveScreen(this); } return true; }
public override bool HandleInputs(InputState input) { if (input.IsMenuDown()) { selected++; if (selected >= Entries.Count) selected = 0; } if (input.IsMenuUp()) { selected--; if (selected < 0) selected = Entries.Count - 1; } if (input.IsMenuSelect()) { if (Session.currentSession.Inventory.IsUseable(Consumable, Entries[selected])) { ScriptEngine.ScriptEngine.Instance.SetVar("PartySelect", selected); ScriptEngine.ScriptEngine.Instance.Execute(Consumable.Action); Session.currentSession.Inventory.RemoveItem(Consumable, 1); GameStateManager.Instance.RemoveScreen(this); } } if (input.IsBack()) { GameStateManager.Instance.RemoveScreen(this); } return true; }
public override bool HandleInputs(InputState input) { if (input.IsMenuDown()) { selected++; if (selected >= Texts.Length) selected = 0; } if (input.IsMenuUp()) { selected--; if (selected < 0) selected = Texts.Length - 1; } if (input.IsMenuSelect()) { switch (selected) { case 0: // Attack GameStateManager.Instance.AddScreen(new CombatVictimSelectScreen(Attacker, Enemies, Group, "Attack"), true, false); break; case 1: // Skill if (Attacker.Skills.Count > 0) { GameStateManager.Instance.AddScreen(new CombatSkillSelectScreen(Attacker, Enemies, Group), true, false); } break; case 2: // Item GameStateManager.Instance.AddScreen(new CombatConsumableSelectScreen(Attacker, Group), true, false); break; } } if (input.IsBack()) { this.Attacker.ATB -= 50; GameStateManager.Instance.RemoveScreen(this); } return true; }
public override bool HandleInputs(InputState input) { if (input.IsMenuDown()) { selected++; if (selected >= Entries.Count) selected = 0; } if (input.IsMenuUp()) { selected--; if (selected < 0) selected = Entries.Count - 1; } if (input.IsMenuSelect()) Entries[selected].Select(); return true; }
public override bool HandleInputs(InputState input) { List<IMenuEntry> Entries = Menu[Keys[selectedCategory]]; if (input.IsMenuDown()) { selected++; if (selected >= Entries.Count) selected = 0; } if (input.IsMenuUp()) { selected--; if (selected < 0) selected = Entries.Count - 1; } if (input.IsMenuSelect()) Entries[selected].Select(); if (input.IsNext()) { selected = 0; selectedCategory++; if (selectedCategory >= Keys.Count) selectedCategory = 0; } if (input.IsPrevious()) { selected = 0; selectedCategory--; if (selectedCategory < 0) selectedCategory = Keys.Count - 1; } return true; }
public override bool HandleInputs(InputState input) { if (input.IsMenuDown()) { selected++; if (selected >= Entries.Count) selected = 0; } if (input.IsMenuUp()) { selected--; if (selected < 0) selected = Entries.Count - 1; } if (input.IsMenuSelect()) { } if (input.IsBack()) GameStateManager.Instance.RemoveScreen(this); return true; }