C# 클래스 Pathfinding.MultiTargetPath

상속: ABPath
파일 보기 프로젝트 열기: TruckDefenseInstitute/Convoy 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
callbacks OnPathDelegate[]
chosenTarget int
heuristicMode HeuristicMode
nodePaths List[]
originalTargetPoints Vector3[]
pathsForAll bool
targetNodes GraphNode[]
targetPoints Vector3[]
targetsFound bool[]
vectorPaths List[]

보호된 프로퍼티들

프로퍼티 타입 설명
targetNodeCount int

공개 메소드들

메소드 설명
ChooseShortestPath ( ) : void

Set chosenTarget to the index of the shortest path

Construct ( Array startPoints, Vector3 target, Array callbackDelegates, OnPathDelegate callback = null ) : MultiTargetPath
Construct ( Vector3 start, Array targets, Array callbackDelegates, OnPathDelegate callback = null ) : MultiTargetPath
MultiTargetPath ( ) : UnityEngine

Default constructor. Do not use this. Instead use the static Construct method which can handle path pooling.

RecalculateHTarget ( bool firstTime ) : void
ResetFlags ( ) : void

Reset flag1 on all nodes after the pathfinding has completed (no matter if an error occurs or if the path is canceled)

SetPathParametersForReturn ( int target ) : void

보호된 메소드들

메소드 설명
CalculateStep ( long targetTick ) : void
Cleanup ( ) : void
FoundTarget ( PathNode nodeR, int i ) : void
Initialize ( ) : void
OnEnterPool ( ) : void
Prepare ( ) : void
RebuildOpenList ( ) : void
Reset ( ) : void
ReturnPath ( ) : void
Setup ( Vector3 start, Array targets, Array callbackDelegates, OnPathDelegate callback ) : void
Trace ( PathNode node ) : void

비공개 메소드들

메소드 설명
DebugString ( PathLog logMode ) : string

메소드 상세

CalculateStep() 보호된 메소드

protected CalculateStep ( long targetTick ) : void
targetTick long
리턴 void

ChooseShortestPath() 공개 메소드

Set chosenTarget to the index of the shortest path
public ChooseShortestPath ( ) : void
리턴 void

Cleanup() 보호된 메소드

protected Cleanup ( ) : void
리턴 void

Construct() 공개 정적인 메소드

public static Construct ( Array startPoints, Vector3 target, Array callbackDelegates, OnPathDelegate callback = null ) : MultiTargetPath
startPoints Array
target Vector3
callbackDelegates Array
callback OnPathDelegate
리턴 MultiTargetPath

Construct() 공개 정적인 메소드

public static Construct ( Vector3 start, Array targets, Array callbackDelegates, OnPathDelegate callback = null ) : MultiTargetPath
start Vector3
targets Array
callbackDelegates Array
callback OnPathDelegate
리턴 MultiTargetPath

FoundTarget() 보호된 메소드

protected FoundTarget ( PathNode nodeR, int i ) : void
nodeR PathNode
i int
리턴 void

Initialize() 보호된 메소드

protected Initialize ( ) : void
리턴 void

MultiTargetPath() 공개 메소드

Default constructor. Do not use this. Instead use the static Construct method which can handle path pooling.
public MultiTargetPath ( ) : UnityEngine
리턴 UnityEngine

OnEnterPool() 보호된 메소드

protected OnEnterPool ( ) : void
리턴 void

Prepare() 보호된 메소드

protected Prepare ( ) : void
리턴 void

RebuildOpenList() 보호된 메소드

protected RebuildOpenList ( ) : void
리턴 void

RecalculateHTarget() 공개 메소드

public RecalculateHTarget ( bool firstTime ) : void
firstTime bool
리턴 void

Reset() 보호된 메소드

protected Reset ( ) : void
리턴 void

ResetFlags() 공개 메소드

Reset flag1 on all nodes after the pathfinding has completed (no matter if an error occurs or if the path is canceled)
public ResetFlags ( ) : void
리턴 void

ReturnPath() 보호된 메소드

protected ReturnPath ( ) : void
리턴 void

SetPathParametersForReturn() 공개 메소드

public SetPathParametersForReturn ( int target ) : void
target int
리턴 void

Setup() 보호된 메소드

protected Setup ( Vector3 start, Array targets, Array callbackDelegates, OnPathDelegate callback ) : void
start Vector3
targets Array
callbackDelegates Array
callback OnPathDelegate
리턴 void

Trace() 보호된 메소드

protected Trace ( PathNode node ) : void
node PathNode
리턴 void

프로퍼티 상세

callbacks 공개적으로 프로퍼티

Callbacks to call for each individual path
public OnPathDelegate[] callbacks
리턴 OnPathDelegate[]

chosenTarget 공개적으로 프로퍼티

The closest target index (if any target was found)
public int chosenTarget
리턴 int

heuristicMode 공개적으로 프로퍼티

How to calculate the heuristic. The \link hTarget heuristic target point \endlink can be calculated in different ways, by taking the Average position of all targets, or taking the mid point of them (i.e center of the AABB encapsulating all targets). The one which works best seems to be Sequential, it sets hTarget to the target furthest away, and when that target is found, it moves on to the next one.\n Some modes have the option to be 'moving' (e.g 'MovingAverage'), that means that it is updated every time a target is found.\n The H score is calculated according to AstarPath.heuristic Note: If pathsForAll is false then this option is ignored and it is always treated as being set to None
public HeuristicMode heuristicMode
리턴 HeuristicMode

nodePaths 공개적으로 프로퍼티

Stores all paths to the targets. Elements are null if no path was found
public List[] nodePaths
리턴 List[]

originalTargetPoints 공개적으로 프로퍼티

Target points specified when creating the path. These are not snapped to the nearest nodes
public Vector3[] originalTargetPoints
리턴 Vector3[]

pathsForAll 공개적으로 프로퍼티

If true, a path to all targets will be returned, otherwise just the one to the closest one.
public bool pathsForAll
리턴 bool

targetNodeCount 보호되어 있는 프로퍼티

Number of target nodes left to find
protected int targetNodeCount
리턴 int

targetNodes 공개적으로 프로퍼티

Nearest nodes to the targetPoints
public GraphNode[] targetNodes
리턴 GraphNode[]

targetPoints 공개적으로 프로퍼티

Target points specified when creating the path. These are snapped to the nearest nodes
public Vector3[] targetPoints
리턴 Vector3[]

targetsFound 공개적으로 프로퍼티

Indicates if the target has been found. Also true if the target cannot be reached (is in another area)
public bool[] targetsFound
리턴 bool[]

vectorPaths 공개적으로 프로퍼티

Stores all vector paths to the targets. Elements are null if no path was found
public List[] vectorPaths
리턴 List[]