Esempio n. 1
0
 // Returns the Method in this Task that fulfills the preconditions in the worldstate, if any
 public Method FindSatisfiedMethod(WorldState ws)
 {
     foreach (Method method in methods)
     {
         if (EnemyAgentPlanner.MethodConditionMet(method, ws))   // only true if a method satisfies the preconditions in the worldstate
         {
             return(method);
         }
     }
     return(null);
 }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     agent          = GetComponent <NavMeshAgent>();
     itemsRemaining = gameMgr.items;
     hidingSpots    = new GameObject[12];
     for (int i = 0; i < gameMgr.alcoves.Length; i++) // add all the alcoves to the hidingSpots
     {
         hidingSpots[i] = gameMgr.alcoves[i];
     }
     hidingSpots[10]  = gameMgr.spawner.leftSpot;
     hidingSpots[11]  = gameMgr.spawner.rightSpot;
     planner          = GetComponent <EnemyAgentPlanner>();
     numTeleportTraps = 2;
 }