コード例 #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.tag == "NPS")
     {
         other.GetComponent <Nps>().followPlayer           = false;
         other.GetComponent <Nps>().moveToExit             = true;
         other.GetComponent <Nps>().agent.stoppingDistance = 0.1f;
         other.GetComponent <Nps>().destynation            = positions[nextSpot];
         nextSpot++;
         uIControler.updatePeople();
         if (nextSpot == 3)
         {
             Debug.Log("you Win");
             uIControler.activeWonPanel();
         }
     }
 }