Exemplo n.º 1
0
        private void Act()
        {
            List <Verb> traversalVerbs = GetVerbs("TraversalVerb");

            if (traversalVerbs.Count > 0)
            {
                ContainerAttachmentPoint container = controlledObject.container as ContainerAttachmentPoint;
                if (container != null)
                {
                    Connection[] connections = container.GetConnections();
                    int          choice      = random.Next(0, connections.Length);

                    Dictionary <string, object> data = new Dictionary <string, object>();
                    data["target"] = connections[choice];
                    traversalVerbs[0].Register(data);                     // XXX: Should pick most appropriate traversal verb
                }
            }
        }
Exemplo n.º 2
0
 public Connection[] GetConnections()
 {
     return(contents.GetConnections());
 }