// Try to process a Command, only BattleActionCommand can be processed in Battle public bool ProcessCommand(Core.Command command) { Core.BattleActionCommand actionCommand; try { actionCommand = (Core.BattleActionCommand)command; } catch (System.Exception) { return(false); } // TODO, need check but TRUST command in version1 if (actionCommand.Source == GetCurrentActiveUnit()) { actionCommand.Action.Act(actionCommand.Source, actionCommand.TargetUnits); return(true); } else { return(false); } }
private void RunCommand(Core.Command cmd) { invoker.SetCommand(cmd); invoker.Run(); }