Example #1
0
 private void Update()
 {
     if (Input.GetMouseButtonDown(0))
     {
         RaycastHit hit;
         Ray        ray = Camera.main.ScreenPointToRay(Input.mousePosition);
         if (Physics.Raycast(ray, out hit, 1000))
         {
             NPC.NewPath(GetPath(NPC.transform.position, hit.point));
         }
     }
 }
Example #2
0
 public void NewPath(Path newPath)
 {
     pathFollower.NewPath(newPath);
 }