Exemple #1
0
    // Use this for initialization
    void Start()
    {
        agents = new List <NEEDSIMNode> ();
        agent1 = null;
        agent2 = null;

        state = State.NoConversation;


        worldEngine = new WorldEngine();
        worldEngine.loadWorldFile();

        dialogueGenerator = new DialogueGenerator(worldEngine);

        cParams = new ConversationalParamaters(ConversationalParamaters.conversationType.helloOnly, "<agent1>", "<agent2>");
        cParams.greetingMode         = ConversationalParamaters.GreetingMode.fourTurn;
        cParams.farewellMode         = ConversationalParamaters.FarewellMode.simple;
        cParams.conversationLocation = worldEngine.world.findByProperNoun("Germany");

        QUDitem q = new QUDitem(QUDitem.ExchangeTypeEnum.where);

        q.subject = worldEngine.world.findByProperNoun("Westerberg Campus");

        cParams.addQUDitem(q);
    }
Exemple #2
0
    void PickRandomPair()
    {
        int i1 = Random.Range(0, agents.Count - 1);
        int i2 = Random.Range(0, agents.Count - 2);

        if (i2 >= i1)
        {
            i2 += 1;
        }

        agent1 = agents [i1];
        agent2 = agents [i2];
    }
Exemple #3
0
 void Start()
 {
     thisNode = GetComponent <NEEDSIMNode>();
     NEEDSIM.NEEDSIMRoot.Instance.AddNEEDSIMNode(thisNode, transform.parent.GetComponent <NEEDSIMNode>());
     NEEDSIMNode[] nodes = this.GetComponentsInChildren <NEEDSIMNode>();
     foreach (NEEDSIMNode node in nodes)
     {
         if (node.GetInstanceID() != thisNode.GetInstanceID())
         {
             NEEDSIM.NEEDSIMRoot.Instance.AddNEEDSIMNode(node, thisNode);
         }
     }
 }
Exemple #4
0
 public bool DeregisterAgent(NEEDSIMNode agent)
 {
     Debug.Log("Agent wants deregister: " + agent.name);
     if (AgentRegistered(agent))
     {
         agents.Remove(agent);
     }
     if (state == State.NoConversation || (agent != agent1 && agent != agent2))
     {
         Debug.Log("Deregistering Agent savely: " + agent.name);
         return(true);
     }
     if (state == State.ConversationRunning)
     {
         EndConversation();
     }
     return(false);
 }
Exemple #5
0
 public void RegisterAgent(NEEDSIMNode agent)
 {
     Debug.Log("Registering agent");
     agents.Add(agent);
 }
Exemple #6
0
 public bool AgentRegistered(NEEDSIMNode agent)
 {
     return(agents.Contains(agent));
 }
 void Start()
 {
     animator = GetComponent <Animator>();
     nma      = GetComponent <NavMeshAgent>();
     nnode    = GetComponent <NEEDSIMNode>();
 }