public ITurnState Get(TurnStateEnum state) { Assert.ValidEnum(state); Assert.IsTrue(state != TurnStateEnum.Error); TurnState turnState = null; switch (state) { case TurnStateEnum.Start: { turnState = new StartTurnEvent(); break; } case TurnStateEnum.FirstTurnSpellBuff: { turnState = new FirstTurnSpellBuffEvent(); break; } case TurnStateEnum.ActionSurge: { turnState = new ActionSurgeEvent(); break; } case TurnStateEnum.Action: { turnState = new ActionEvent(); break; } case TurnStateEnum.OffHandAttack: { turnState = new OffHandAttackEvent(); break; } case TurnStateEnum.End: { turnState = new EndTurnEvent(); break; } default: { throw new ArgumentException($"Invalid turn state {state}."); } } return(turnState); }
protected override void Setup() { base.Setup(); turnEvent = new OffHandAttackEvent(); }