示例#1
0
 // Update is called once per frame
 void Update()
 {
     if (thisAgentData == null)
     {
         thisAgentData = gameObject.GetComponent <AgentDataGrabber>();
     }
     if (!hasWorkTimes && thisAgentData != null)
     {
         GetWorkTimes();
     }
     if (lastUpdate == null)
     {
         PlanTheDay();
     }
     getTime();
 }
示例#2
0
 // Update is called once per frame
 void Update()
 {
     if (thisAgentData == null)
     {
         thisAgentData = gameObject.GetComponent <AgentDataGrabber>();
         socialDrive   = thisAgentData.socialDrive;
         if (thisAgentData.hasPartner)
         {
             partnerName      = thisAgentData.partnerName;
             partnerTransform = thisAgentData.partnerTransform;
             hasPartner       = true;
         }
     }
     stepTime = Mathf.Clamp(SimulationEpochClock.simDeltaTime * 0.001f, 0, 500);
     if (hasPartner)
     {
         partnerDistance = Vector3.Distance(transform.position, partnerPos);
     }
     lonelyJack();
 }