better pathfinding

This commit is contained in:
j.mei7
2022-03-16 19:47:40 +01:00
parent 2e92ba6ea4
commit e3d888f757
2 changed files with 11 additions and 6 deletions

View File

@@ -145,15 +145,20 @@ public class Person : MonoBehaviour
void Work()
{
if (status != PersonStatus.WORK)
movement.SetTarget(workplace.transform.position);
status = PersonStatus.WORK;
movement.SetTarget(workplace.transform.position);
}
void Sleep()
{
if(status != PersonStatus.SLEEP)
movement.SetTarget(house.transform.position);
status = PersonStatus.SLEEP;
Debug.Log(house.transform.position);
movement.SetTarget(house.transform.position);
}
void SetBehaivorDateTimes()