Doloro GDK 22 .1.0 Beta
by Tauri Interactive
|
Base logic of the navigation path between two points.
Public Types | |
enum | State { NotComputed , Built , Failed , Relayed , InProgress } |
Public Member Functions | |
Path (GraphNode from, GraphNode to) | |
Path (bool isCached, IList< GraphNode > nodes) | |
Creates path with predefined way points. More... | |
Path (bool isCached, params GraphNode[] nodes) | |
Creates path with predefined way points. More... | |
virtual ICollection< GraphNode > | Build () |
Looks for cached Path if not overridden. More... | |
virtual IEnumerator | BuildCoroutine () |
Handler that should look the path using enumerator. In base implementation looks for cached Path in Coroutine friendly way. More... | |
virtual async Task< ICollection< GraphNode > > | BuildAsync () |
Handler that should look the path asynchronously. In base implementation looks for cached Path in tasks friendly way. More... | |
bool | TryLoadCache () |
Loads path cache to the instance in case if exists. More... | |
void | Release () |
Releasing cached path between two nodes in case if has been built. | |
void | MakeFailed () |
Forces path to has State.Failed state. | |
IEnumerator< GraphNode > | GetEnumerator () |
Enumerated computed path. More... | |
Static Public Member Functions | |
static void | ReleaseCache () |
Releases entire cache. | |
static bool | TryGetCachedPath (GraphNode from, GraphNode to, out Path path) |
Looking for last cached path between two nodes. More... | |
static bool | TryGetCachedPath< T > (GraphNode from, GraphNode to, out T path) |
Looking for cached path between two nodes. More... | |
static bool | TryGetCachedPath (Type pathType, GraphNode from, GraphNode to, out Path path) |
Looking for cached path between two nodes. More... | |
Static Protected Member Functions | |
static void | SetPathToCache (Path path) |
Updating cache registry with a path entry. More... | |
Properties | |
static int | CachedPathsCount [get] |
Count of paths in cache. | |
ReadOnlyCollection< GraphNode > | path [get, protected set] |
Public built path. | |
int | Length [get] |
Length of the built path. -1 is not built yet. | |
GraphNode | from [get] |
Path start graph's node. | |
GraphNode | to [get] |
Path finish graph's node. | |
State | state [get, protected set] |
Current state of the path build. | |
bool | isComputed [get] |
Is the path has been computed. | |
bool | isCached [get] |
Checks is the path located at the cache registry to fast access. More... | |
Events | |
static Action< Path > | PathReleased |
Occurs when any path is no longer exists in cache. | |
Doloro.Graphs.Path.Path | ( | bool | isCached, |
IList< GraphNode > | nodes | ||
) |
Doloro.Graphs.Path.Path | ( | bool | isCached, |
params GraphNode[] | nodes | ||
) |
|
virtual |
Looks for cached Path if not overridden.
Reimplemented in Doloro.Graphs.AStarPath.
|
virtual |
Handler that should look the path asynchronously. In base implementation looks for cached Path in tasks friendly way.
Reimplemented in Doloro.Graphs.AStarPath.
|
virtual |
Handler that should look the path using enumerator. In base implementation looks for cached Path in Coroutine friendly way.
Reimplemented in Doloro.Graphs.AStarPath.
IEnumerator< GraphNode > Doloro.Graphs.Path.GetEnumerator | ( | ) |
Enumerated computed path.
|
staticprotected |
Updating cache registry with a path entry.
path | Path to set. |
Decline caching of garbage paths with the 1 length.
|
static |
Looking for last cached path between two nodes.
from | Start point. |
to | End point |
path | Path instance if found. |
|
static |
Looking for cached path between two nodes.
pathType | Type of the path processor. |
from | Start point. |
to | End point |
path | Path instance if found. |
|
static |
Looking for cached path between two nodes.
T | Type of the path processor. |
from | Start point. |
to | End point |
path | Path instance if found. |
T | : | Path |
bool Doloro.Graphs.Path.TryLoadCache | ( | ) |
Loads path cache to the instance in case if exists.
|
get |
Checks is the path located at the cache registry to fast access.