FindPath() 공개 메소드

public FindPath ( Vector3 startPos, Vector3 endPos ) : Path,
startPos Vector3
endPos Vector3
리턴 Path,
예제 #1
0
 public Path <TileProxy> GetPathAIConsideration(TileProxy from, TileProxy to, UnitProxy thingToMove, bool allTiles = false)
 {
     return(PathGenerator.FindPath(from,
                                   to,
                                   GetDistanceFunctionAI(thingToMove, allTiles),
                                   GetEstimationFunction(to, thingToMove)));//might not want to use a list
 }
예제 #2
0
 void mouseInputHandler_OnRightClick(Vector3 displacement)
 {
     if (IsSelected)
     {
         Vector3 endPos = transform.position + displacement;
         endPos.y    = transform.position.y;
         currentPath = pathGenerator.FindPath(transform.position, endPos);
         TargetPos   = currentPath.StartPos;
     }
 }