Exemplo n.º 1
0
 void Awake()
 {
     cam = GetComponent <Camera>();
     foreach (var agent in agentsToDirect)
     {
         Patrol p = agent.GetComponent <Patrol>();
         if (p != null)
         {
             p.patrolSelector = this;
         }
     }
 }
Exemplo n.º 2
0
        // Use this for initialization
        void Start()
        {
            cam = GetComponent <Camera>();

            // Loop through and assign patrol selector to all agents
            foreach (var agent in agentsToDirect)
            {
                Patrol p = agent.GetComponent <Patrol>();
                if (p != null)
                {
                    p.patrolSelector = this;
                }
            }
        }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     cam = GetComponent <Camera>();
     // Loop through each agent and assign patrol selector to all agents
     foreach (var agent in agentsToDirect)
     {
         Patrol p = agent.GetComponent <Patrol>();
         if (p != null)
         {
             // Give patrol reference to this script
             p.patrolSelector = this;
         }
     }
 }