예제 #1
0
 public void gameOver()
 {
     System.Random r = new System.Random((int)this.transform.position.x * (int)Time.time);
     if (r.Next(1, 100) <= 50)
     {
         navi.destination = LocationQueue.getNextPos();
     }
     else
     {
         navi.destination = new Vector3(0f, 0f, 32.23f);
     }
 }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     navi             = GetComponent <NavMeshAgent>();
     navi.destination = LocationQueue.getNextPos();
 }