void OnTriggerEnter(Collider coll) { if (coll.gameObject.tag == "Shootable") { script = coll.GetComponentInChildren <EnnemyMov1> (); script.ChangeDestination(NextPosition); } }
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; }
void Start() { script = GetComponentInChildren <EnnemyMov1>(); FirstDestination = GameObject.Find("Destination1").transform; script.ChangeDestination(FirstDestination); }