// 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(); }
// 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(); }