/// <summary> /// Executes a command of type ICommand. /// </summary> /// <typeparam name="TArgument"></typeparam> /// <param name="command">The command instance to execute.</param> /// <param name="argument">The argument required by the command.</param> public void ExecuteCommand <TArgument>(ICommandWith <TArgument> command, TArgument argument) { GameManager.CommandDispatcher.ExecuteCommand(command, argument); }
/// <summary> /// Executes a command of type ICommand. /// </summary> /// <typeparam name="TArgument"></typeparam> /// <param name="command">The command instance to execute.</param> /// <param name="sender">The sender of the command.</param> /// <param name="argument">The argument required by the command.</param> public void ExecuteCommand <TArgument>(ICommandWith <TArgument> command, ViewModel sender, TArgument argument) { GameManager.CommandDispatcher.ExecuteCommand(command, null); }