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 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); }