Пример #1
0
    void Update()
    {
        total = count.getTotalItem();
        NavMeshAgent agent = GetComponent <NavMeshAgent>();

        agent.destination = player.position;
        speed             = ((100 - battery.getBattery()) / 100) * 5 + baseSpeed;
        agent.speed       = speed;
    }
Пример #2
0
 void Update()
 {
     total = count.getTotalItem();
     if (buttonInRanged == true)
     {
         if (Input.GetKey("e"))
         {
             if (total >= 4)
             {
                 SceneManager.LoadScene("basement");
             }
         }
     }
 }