public MoveActor(Battle battle, PartyMember actor, Think thinkState) : base(battle) { if (actor == null) { throw new Exception("PartyMember actor cannot be null"); } if (thinkState == null) { throw new Exception("Think thinkState cannot be null"); } this.Actor = actor; this.thinkState = thinkState; inputButtonListener = new InputButtonListener(new Dictionary <InputButton, ButtonEventHandlers> { { InputButton.Up, new ButtonEventHandlers(down: moveActorUp) }, { InputButton.Down, new ButtonEventHandlers(down: moveActorDown) }, { InputButton.Left, new ButtonEventHandlers(down: moveActorBack) }, { InputButton.Right, new ButtonEventHandlers(down: moveActorForward) }, { InputButton.A, new ButtonEventHandlers(up: Finish) }, { InputButton.B, new ButtonEventHandlers(up: cancel) } }); BattleStateRenderer = new MoveActorRenderer(this, thinkState.BattleStateRenderer); }
public Think(Battle battle) : base(battle) { CurrentThinkActionType = ThinkActionType.None; currentThinkAction = null; CurrentOptionNameIndex = 0; MenuOptions = null; inOuterMenu = true; CurrentOuterMenuOptionIndex = 0; weaponMenuOptions = new Dictionary <CharacterClass, List <ThinkMenuOption> >(); foreach (CharacterClass characterClass in Enum.GetValues(typeof(CharacterClass))) { weaponMenuOptions.Add(characterClass, new List <ThinkMenuOption>()); } shieldMenuOptions = new List <ThinkMenuOption>(); itemMenuOptions = new List <ThinkMenuOption>(); Actions = new List <ThinkAction>(battle.PlayerParty.Count); inputButtonListener = new InputButtonListener(new Dictionary <InputButton, ButtonEventHandlers> { { InputButton.Up, new ButtonEventHandlers(down: upHandler) }, { InputButton.Down, new ButtonEventHandlers(down: downHandler) }, { InputButton.Left, new ButtonEventHandlers(down: leftHandler) }, { InputButton.Right, new ButtonEventHandlers(down: rightHandler) }, { InputButton.A, new ButtonEventHandlers(up: selectOption) }, { InputButton.B, new ButtonEventHandlers(up: cancelAction) } }); }
public Think(Battle battle) : base(battle) { CurrentThinkActionType = ThinkActionType.None; currentThinkAction = null; CurrentOptionNameIndex = 0; MenuOptions = null; inOuterMenu = true; CurrentOuterMenuOptionIndex = 0; weaponMenuOptions = new Dictionary<CharacterClass, List<ThinkMenuOption>>(); foreach (CharacterClass characterClass in Enum.GetValues(typeof(CharacterClass))) weaponMenuOptions.Add(characterClass, new List<ThinkMenuOption>()); shieldMenuOptions = new List<ThinkMenuOption>(); itemMenuOptions = new List<ThinkMenuOption>(); Actions = new List<ThinkAction>(battle.PlayerParty.Count); inputButtonListener = new InputButtonListener(new Dictionary<InputButton, ButtonEventHandlers> { { InputButton.Up, new ButtonEventHandlers(down: upHandler) }, { InputButton.Down, new ButtonEventHandlers(down: downHandler) }, { InputButton.Left, new ButtonEventHandlers(down: leftHandler) }, { InputButton.Right, new ButtonEventHandlers(down: rightHandler) }, { InputButton.A, new ButtonEventHandlers(up: selectOption) }, { InputButton.B, new ButtonEventHandlers(up: cancelAction) } }); }
public Menu(Overworld overworld) : base(overworld) { inputButtonListener = new InputButtonListener(new Dictionary <InputButton, ButtonEventHandlers> { { InputButton.Up, new ButtonEventHandlers(down: previousOption) }, { InputButton.Down, new ButtonEventHandlers(down: nextOption) }, { InputButton.A, new ButtonEventHandlers(up: selectOption) } }); }
public Menu(Overworld overworld) : base(overworld) { inputButtonListener = new InputButtonListener(new Dictionary<InputButton, ButtonEventHandlers> { { InputButton.Up, new ButtonEventHandlers(down: previousOption) }, { InputButton.Down, new ButtonEventHandlers(down: nextOption) }, { InputButton.A, new ButtonEventHandlers(up: selectOption) } }); }
public Win(Battle battle) : base(battle) { WinMessage = ResourceManager.BattleWinMessages.Sample(); ItemsWon = new List <Tuple <string, CharacterClass> >(); inputButtonListener = new InputButtonListener(new Dictionary <InputButton, ButtonEventHandlers> { { InputButton.Up, new ButtonEventHandlers(down: previousItem) }, { InputButton.Down, new ButtonEventHandlers(down: nextItem) } }); }
public Win(Battle battle) : base(battle) { WinMessage = ResourceManager.BattleWinMessages.Sample(); ItemsWon = new List<Tuple<string, CharacterClass>>(); inputButtonListener = new InputButtonListener(new Dictionary<InputButton, ButtonEventHandlers> { { InputButton.Up, new ButtonEventHandlers(down: previousItem) }, { InputButton.Down, new ButtonEventHandlers(down: nextItem) } }); }
public SelectTarget(Battle battle, ThinkAction thinkAction) : base(battle) { if (thinkAction == null) throw new Exception("ThinkAction cannot be null"); this.thinkAction = thinkAction; isEnemy = Battle.GetPartyForPartyMember(thinkAction.Actor) == Battle.EnemyParty; inputButtonListener = isEnemy ? null : new InputButtonListener(new Dictionary<InputButton, ButtonEventHandlers> { { InputButton.Up, new ButtonEventHandlers(down: chooseTargetUp) }, { InputButton.Down, new ButtonEventHandlers(down: chooseTargetDown) }, { InputButton.Left, new ButtonEventHandlers(down: chooseTargetLeft) }, { InputButton.Right, new ButtonEventHandlers(down: chooseTargetRight) }, { InputButton.A, new ButtonEventHandlers(up: selectTarget) }, { InputButton.B, new ButtonEventHandlers(up: cancelTargetSelection) } }); }
public SelectTarget(Battle battle, ThinkAction thinkAction) : base(battle) { if (thinkAction == null) { throw new Exception("ThinkAction cannot be null"); } this.thinkAction = thinkAction; isEnemy = Battle.GetPartyForPartyMember(thinkAction.Actor) == Battle.EnemyParty; inputButtonListener = isEnemy ? null : new InputButtonListener(new Dictionary <InputButton, ButtonEventHandlers> { { InputButton.Up, new ButtonEventHandlers(down: chooseTargetUp) }, { InputButton.Down, new ButtonEventHandlers(down: chooseTargetDown) }, { InputButton.Left, new ButtonEventHandlers(down: chooseTargetLeft) }, { InputButton.Right, new ButtonEventHandlers(down: chooseTargetRight) }, { InputButton.A, new ButtonEventHandlers(up: selectTarget) }, { InputButton.B, new ButtonEventHandlers(up: cancelTargetSelection) } }); }
public MoveActor(Battle battle, PartyMember actor, Think thinkState) : base(battle) { if (actor == null) throw new Exception("PartyMember actor cannot be null"); if (thinkState == null) throw new Exception("Think thinkState cannot be null"); this.Actor = actor; this.thinkState = thinkState; inputButtonListener = new InputButtonListener(new Dictionary<InputButton, ButtonEventHandlers> { { InputButton.Up, new ButtonEventHandlers(down: moveActorUp) }, { InputButton.Down, new ButtonEventHandlers(down: moveActorDown) }, { InputButton.Left, new ButtonEventHandlers(down: moveActorBack) }, { InputButton.Right, new ButtonEventHandlers(down: moveActorForward) }, { InputButton.A, new ButtonEventHandlers(up: Finish) }, { InputButton.B, new ButtonEventHandlers(up: cancel) } }); BattleStateRenderer = new MoveActorRenderer(this, thinkState.BattleStateRenderer); }