A* Pathfinding Project  4.0.8
The A* Pathfinding Project for Unity 3D
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Events Macros Groups Pages
SingleNodeBlocker Class Reference

Blocks single nodes in a graph. More...

Detailed Description

Blocks single nodes in a graph.

This is useful in turn based games where you want units to avoid all other units while pathfinding but not be blocked by itself.

Note
This cannot be used together with any movement script as the nodes are not blocked in the normal way.
See Also
TurnBasedAI for example usage
BlockManager
Utilities for turn-based games

Public Member Functions

void Block (GraphNode node)
 Block specified node.
 
void BlockAt (Vector3 position)
 Block node closest to the specified position.
 
void BlockAtCurrentPosition ()
 Block node closest to the position of this object.
 
void Unblock ()
 Unblock the last node that was blocked (if any)
 

Public Attributes

BlockManager manager
 

Properties

GraphNode lastBlocked [get, set]
 

Additional Inherited Members

- Protected Member Functions inherited from VersionedMonoBehaviour
virtual void Awake ()
 
virtual int OnUpgradeSerializedData (int version)
 Handle serialization backwards compatibility.
 

Member Function Documentation

void Block ( GraphNode  node)

Block specified node.

Will unblock the last node that was reserved (if any)

void BlockAt ( Vector3  position)

Block node closest to the specified position.

Will unblock the last node that was reserved (if any)

void BlockAtCurrentPosition ( )

Block node closest to the position of this object.

Will unblock the last node that was reserved (if any)

void Unblock ( )

Unblock the last node that was blocked (if any)

Member Data Documentation

BlockManager manager

Property Documentation

GraphNode lastBlocked
getset

The documentation for this class was generated from the following file: