예제 #1
0
 // Start is called before the first frame update
 void Start()
 {
     if (SelfRegisterOnStart)
     {
         PathfindingHost.RegisterAgent(this, true);
     }
     ;
     AgentStatus = PathfindingAgent.Status.WaitingForTarget;
 }
예제 #2
0
 // Start is called before the first frame update
 void Start()
 {
     agentLRColourStart = GetRandomColour();
     agentLRColourEnd   = GetRandomColour();
     if (GetComponent <PathfindingGrid>() == null)
     {
         grid = gameObject.AddComponent <PathfindingGrid>();
     }
     else
     {
         grid = GetComponent <PathfindingGrid>();
     };
     AgentStatus = Status.WaitingForTarget;
     if (SelfRegisterOnStart)
     {
         PathfindingHost.RegisterAgent(this, true);
     }
 }