public IfEachChildMatchQuestCommand(Predicate <Quest> predicate, IQuestCommand innerCommand) { predicate.ThrowIfNull(nameof(predicate)); innerCommand.ThrowIfNull(nameof(innerCommand)); _predicate = predicate; _inner = innerCommand; }
/// <summary> /// Receives quest to operate on and command, that represents operation on quest. /// </summary> /// <param name="quest"></param> /// <param name="questCommand"></param> public CurrentQuestCommand(Quest quest, IQuestCommand questCommand) { quest.ThrowIfNull(nameof(quest)); questCommand.ThrowIfNull(nameof(questCommand)); QuestRef = quest; QuestCommand = questCommand; }
public UpToRootQuestCommand(IQuestTree questTree, IQuestCommand innerCommand) { questTree.ThrowIfNull(nameof(questTree)); innerCommand.ThrowIfNull(nameof(innerCommand)); _questTree = questTree; _innerCommand = innerCommand; }
/// <summary> /// Receives quest to traverse and quest tree. /// </summary> /// <param name="quest"></param> /// <param name="questCommand"></param> protected UpHierarchyQuestCommand(Quest quest, IQuestCommand questCommand) { quest.ThrowIfNull(nameof(quest)); questCommand.ThrowIfNull(nameof(questCommand)); _target = quest; _command = questCommand; }
public IfElseQuestCommand(IQuestCommand ifCommand, IQuestCommand elseCommand) { ifCommand.ThrowIfNull(nameof(ifCommand)); elseCommand.ThrowIfNull(nameof(elseCommand)); _ifCommand = ifCommand; _elseCommand = elseCommand; }
/// <summary> /// Receives quest to traverse. /// </summary> /// <param name="quest"></param> /// <param name="beforeTraverseCommand"></param> /// <param name="afterTraverseCommand"></param> public DownHierarchyQuestCommand(Quest quest, IQuestCommand beforeTraverseCommand, IQuestCommand afterTraverseCommand) { quest.ThrowIfNull(nameof(quest)); beforeTraverseCommand.ThrowIfNull(nameof(beforeTraverseCommand)); afterTraverseCommand.ThrowIfNull(nameof(afterTraverseCommand)); _target = quest; _beforeTraverseCommand = beforeTraverseCommand; _afterTraverseCommand = afterTraverseCommand; }