Example #1
0
 internal Reaction(Node node, Conversation conversation, IGameInterface gameInterface, IEnumerable<string> langs)
 {
     _node = node;
     _conversation = conversation;
     _gameInterface = gameInterface;
     _langs = langs;
 }
Example #2
0
 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;
 }
Example #3
0
 protected Reaction ReactionFromNode(Node node)
 {
     return new Reaction(node, _conversation, _gameInterface, _langs);
 }
Example #4
0
 public bool TryGetNode(Node node, IGameInterface world, out Node result)
 {
     return TryGetNode(node.TargetGroup, world, out result);
 }
Example #5
0
 public bool TryGetGroup(Node node, out Group result)
 {
     return TryGetGroup(node.TargetGroup, out result);
 }
Example #6
0
 public Group GetGroup(Node node)
 {
     return GetGroup(node.TargetGroup);
 }