A* Pathfinding Project
4.3.8
The A* Pathfinding Project for Unity 3D
|
Manager for blocker scripts such as SingleNodeBlocker. More...
Manager for blocker scripts such as SingleNodeBlocker.
This is part of the turn based utilities. It can be used for any game, but it is primarily intended for turn based games.
Classes | |
class | TraversalProvider |
Blocks nodes according to a BlockManager. More... | |
Public Types | |
enum | BlockMode { AllExceptSelector, OnlySelector } |
Public Member Functions | |
void | InternalBlock (GraphNode node, SingleNodeBlocker blocker) |
Register blocker as being present at the specified node. More... | |
void | InternalUnblock (GraphNode node, SingleNodeBlocker blocker) |
Remove blocker from the specified node. More... | |
bool | NodeContainsAnyExcept (GraphNode node, List< SingleNodeBlocker > selector) |
True if the node contains any blocker which is not included in the selector list. More... | |
bool | NodeContainsAnyOf (GraphNode node, List< SingleNodeBlocker > selector) |
True if the node contains any blocker which is included in the selector list. More... | |
Private Member Functions | |
void | Start () |
Private Attributes | |
Dictionary< GraphNode, List< SingleNodeBlocker > > | blocked = new Dictionary<GraphNode, List<SingleNodeBlocker> >() |
Contains info on which SingleNodeBlocker objects have blocked a particular node. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from VersionedMonoBehaviour | |
virtual void | Awake () |
virtual int | OnUpgradeSerializedData (int version, bool unityThread) |
Handle serialization backwards compatibility. More... | |
virtual void | Reset () |
Handle serialization backwards compatibility. More... | |
Properties inherited from VersionedMonoBehaviour | |
int Util.IEntityIndex. | EntityIndex [get, set] |
Internal entity index used by #BurstBatchHelper. More... | |
Properties inherited from IEntityIndex | |
int | EntityIndex [get, set] |
|
strong |
Enumerator | |
---|---|
AllExceptSelector | All blockers except those in the TraversalProvider.selector list will block. |
OnlySelector | Only elements in the TraversalProvider.selector list will block. |
void InternalBlock | ( | GraphNode | node, |
SingleNodeBlocker | blocker | ||
) |
Register blocker as being present at the specified node.
Calling this method multiple times will add multiple instances of the blocker to the node.
void InternalUnblock | ( | GraphNode | node, |
SingleNodeBlocker | blocker | ||
) |
Remove blocker from the specified node.
Will only remove a single instance, calling this method multiple times will remove multiple instances of the blocker from the node.
bool NodeContainsAnyExcept | ( | GraphNode | node, |
List< SingleNodeBlocker > | selector | ||
) |
True if the node contains any blocker which is not included in the selector list.
bool NodeContainsAnyOf | ( | GraphNode | node, |
List< SingleNodeBlocker > | selector | ||
) |
True if the node contains any blocker which is included in the selector list.
|
private |
|
private |
Contains info on which SingleNodeBlocker objects have blocked a particular node.