internal Reaction(Node node, Conversation conversation, IGameInterface gameInterface, IEnumerable<string> langs) { _node = node; _conversation = conversation; _gameInterface = gameInterface; _langs = langs; }
public bool TryGetNode(string groupId, IGameInterface world, out Node result) { result = null; Group group = null; if (TryGetGroup(groupId, out group) == false) return false; // for each node in group call test and return the latest foreach (var node in group) { if (node.TestConditions(world) == true) result = node; } return result != null; }
protected Reaction ReactionFromNode(Node node) { return new Reaction(node, _conversation, _gameInterface, _langs); }
public bool TryGetNode(Node node, IGameInterface world, out Node result) { return TryGetNode(node.TargetGroup, world, out result); }
public bool TryGetGroup(Node node, out Group result) { return TryGetGroup(node.TargetGroup, out result); }
public Group GetGroup(Node node) { return GetGroup(node.TargetGroup); }