Esempio n. 1
0
 public bool FindSuccessNode()
 {
     if (SuccessNode == null)
     {
         ActionNodeState successState = null;
         if (ParentChunk.GetNode(State.SuccessActionNodeName, false, out successState))
         {
             SuccessNode = successState.actionNode;
             if (SuccessNode == null)
             {
                 //Debug.Log ("Couldn't find success node in " + name + " but it doesn't matter, still returning true");
                 return(false);
             }
         }
     }
     return(true);
 }
Esempio n. 2
0
 public bool FindGuardNode()
 {
     if (GuardNode == null)
     {
         ActionNodeState guardNodeState = null;
         if (ParentChunk.GetNode(State.GuardActionNodeName, false, out guardNodeState))
         {
             guardNodeState.OccupantIsDead = State.GuardIsDead;
             GuardNode = guardNodeState.actionNode;
             if (GuardNode == null)
             {
                 //Debug.Log ("Couldn't get guard node from action node state, quitting in " + name);
                 return(false);
             }
         }
         else
         {
             //Debug.Log ("Couldn't get guard node from parent chunk, quitting in " + name);
             return(false);
         }
     }
     return(true);
 }