|
| GraphNode (AstarPath astar) |
| Constructor for a graph node.
|
|
uint | flags |
| Bitpacked field holding several pieces of data.
|
|
uint | Area [get, set] |
|
bool | Destroyed [get] |
|
uint | Flags [get, set] |
| Holds various bitpacked variables.
|
|
uint | GraphIndex [get, set] |
|
int | NodeIndex [get] |
| Internal unique index.
|
|
uint | Penalty [get, set] |
| Penalty cost for walking on this node.
|
|
uint | Tag [get, set] |
|
bool | Walkable [get, set] |
| True if the node is traversable.
|
|
override void AddConnection |
( |
GraphNode |
node, |
|
|
uint |
cost |
|
) |
| |
|
virtual |
Add a connection from this node to the specified node.
If the connection already exists, the cost will simply be updated and no extra connection added.
- Note
- Only adds a one-way connection. Consider calling the same function on the other node to get a two-way connection.
Implements GraphNode.
override void ClearConnections |
( |
bool |
alsoReverse | ) |
|
|
virtual |
Remove all connections from this node.
- Parameters
-
alsoReverse | if true, neighbours will be requested to remove connections to this node. |
Implements GraphNode.
override bool ContainsConnection |
( |
GraphNode |
node | ) |
|
|
virtual |
Checks if this node has a connection to the specified node.
Reimplemented from GraphNode.
Used to deserialize references to other nodes e.g connections.
Use the GraphSerializationContext.GetNodeIdentifier and GraphSerializationContext.GetNodeFromIdentifier methods for serialization and deserialization respectively.
Nodes must override this method and serialize their connections. Graph generators do not need to call this method, it will be called automatically on all nodes at the correct time by the serializer.
Reimplemented from GraphNode.
Calls the delegate with all connections from this node.
Implements GraphNode.
override void RemoveConnection |
( |
GraphNode |
node | ) |
|
|
virtual |
Removes any connection from this node to the specified node.
If no such connection exists, nothing will be done.
- Note
- This only removes the connection from this node to the other node. You may want to call the same function on the other node to remove its eventual connection to this node.
Implements GraphNode.
Used to serialize references to other nodes e.g connections.
Use the GraphSerializationContext.GetNodeIdentifier and GraphSerializationContext.GetNodeFromIdentifier methods for serialization and deserialization respectively.
Nodes must override this method and serialize their connections. Graph generators do not need to call this method, it will be called automatically on all nodes at the correct time by the serializer.
Reimplemented from GraphNode.
void SetPosition |
( |
Int3 |
value | ) |
|
GameObject this node was created from (if any).
- Warning
- When loading a graph from a saved file or from cache, this field will be null.
Used for internal linked list structure.
- Warning
- Do not modify
The documentation for this class was generated from the following file:
- /Users/arong/Unity/a-pathfinding-project/Assets/AstarPathfindingProject/Generators/NodeClasses/PointNode.cs