public override void Enter(StateController <BattleSystem.BattlePhase> owner, IStateArgument argument = null) { var arg = new InvokeCommand.Argument { command = battleSystem.Enemy.GetCommand(), commandInvoker = battleSystem.Enemy, completeInvokeCommandAction = () => owner.Change(BattleSystem.BattlePhase.EnemyTurnEnd) }; owner.Change(BattleSystem.BattlePhase.InvokeCommand, arg); }
public override void Enter(StateController <BattleSystem.BattlePhase> owner, IStateArgument argument = null) { battleSystem.UIView.SetCommandButtonInteractable(true); battleSystem.UIView.SelectCommandAsObservable() .Subscribe(x => { var arg = new InvokeCommand.Argument { command = x.Command, commandInvoker = battleSystem.Player, completeInvokeCommandAction = () => owner.Change(BattleSystem.BattlePhase.PlayerTurnEnd) }; x.ResetCoolTime(); owner.Change(BattleSystem.BattlePhase.InvokeCommand, arg); }) .AddTo(ActiveDisposables); }