Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.21 KB | None | 0 0
  1. {
  2.     public GameObject[] EnemyList;
  3.  
  4. function Update () {
  5.  
  6. int index = Random.Range (0, EnemyList.Lenght-1);//faz o sorteio de Enemy de indice index
  7.            
  8. nav.SetDestination (EnemyList[index].position);
  9.  
  10. }
  11.  
  12.  
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement