Exemplo n.º 1
0
 void Update()
 {
     if (GameObject.FindObjectOfType <PlayerMovement>() != null)
     {
         targetLocation = GameObject.FindObjectOfType <PlayerMovement>().transform.position;
     }
     //run main loop
     if (isKnockingBack == false)
     {
         Intelligence.AILoop(this);
         if (myHealth != null)
         {
             if (myHealth.isDead)
             {
                 //die
                 Die();
             }
         }
     }
 }