Esempio n. 1
0
 private void OnTriggerEnter(Collider col)
 {
     if (col.gameObject.TryGetComponent(out playerControl player))
     {
         SetLock(true);
         foreach (var AIComponent in enemyAIManagers)
         {
             AIComponent.EnableBehavior();
         }
     }
 }
Esempio n. 2
0
 // Start is called before the first frame update
 void Start()
 {
     box = GetComponent <Collider>();
     // If isLocked has been set to true in the inspector
     if (isLocked)
     {
         SetLock(true);
         foreach (var AIComponent in enemyAIManagers)
         {
             AIComponent.EnableBehavior();
         }
     }
 }