コード例 #1
0
 // Saving repeated code by extracting movement and pathing checks to this function
 // Returns true for ready to proceed, and false for still moving
 private bool MovementChecker()
 {
     if (m_MoveScript.IsMoving())                                 // If character is currently moving...
     {
         return(false);                                           // Then return NOT ready flag
     }
     if (m_PathFinder.GetCurrentNodeName() != m_TargetNodeString) // If not moving, and not at desired node..
     {
         m_MoveScript.TryPath(m_TargetNodeString);                // Try to start pathing
         return(false);                                           // Return NOT ready flag
     }
     return(true);                                                // Otherwise, not moving and at target node so return ready
 } // End of MovementChecker() function