Exemple #1
0
 void OnTriggerEnter(Collider coll)
 {
     if (coll.gameObject.tag == "Shootable")
     {
         script = coll.GetComponentInChildren <EnnemyMov1> ();
         script.ChangeDestination(NextPosition);
     }
 }
Exemple #2
0
 void Start()      // Pas d'info sur le joueur ici, car si il change, (respawn) marche plus.
 {
     mov1 = GetComponentInParent <EnnemyMov1>();
     hp   = GetComponentInParent <Health>();
     coll = GetComponent <BoxCollider>();
     anim = mov1.animator;
     nav  = mov1.nav;
 }
Exemple #3
0
 void Start()
 {
     script           = GetComponentInChildren <EnnemyMov1>();
     FirstDestination = GameObject.Find("Destination1").transform;
     script.ChangeDestination(FirstDestination);
 }