예제 #1
0
 // Update is called once per frame
 void Update()
 {
     if (target.GetComponent <Criminal_Variables>().following)
     {
         nav.CreatePath(target.transform.position);
     }
     else
     {
         Go_Away();
     }
 }
예제 #2
0
    public void Wait()
    {
        int size = wait_positions.Count;

        if (nav.path.corners.Length < 1)
        {
            nav.CreatePath(wait_positions[Random.Range(0, size)].transform.position);
        }
        if (waiting)
        {
            this.GetComponent <Move>().max_mov_speed = 2;
            nav.CreatePath(wait_positions[Random.Range(0, size)].transform.position);
        }
    }
예제 #3
0
 public void Go_Away()
 {
     nav.CreatePath(go_away.transform.position);
 }
예제 #4
0
 public void Go_Start()
 {
     nav.CreatePath(target.transform.position);
     positioned = false;
 }