Class GridNodeBase Extends GraphNode

Public Abstract

Base class for GridNode and LevelGridNode.

Public Methods

AddConnection (node, cost)

Add a connection from this node to the specified node.

Public
ClearConnections (alsoReverse)

Remove all connections from this node.

Public
ClearCustomConnections (alsoReverse)

Same as ClearConnections, but does not clear grid connections, only custom ones (e.g added by AddConnection or a NodeLink component)

Public
ContainsConnection (node)

Checks if this node has a connection to the specified node.

Public
DeserializeReferences (ctx)

Used to deserialize references to other nodes e.g connections.

Public
GetConnections (action)

Calls the delegate with all connections from this node.

Public
GetGizmoHashCode ()

Hash code used for checking if the gizmos need to be updated.

Public
GetNeighbourAlongDirection (direction)

Adjacent grid node in the specified direction.

Public Abstract
Open (path, pathNode, handler)

Open the node.

Public
RandomPointOnSurface ()

A random point on the surface of the node.

Public
RemoveConnection (node)

Removes any connection from this node to the specified node.

Public
SerializeReferences (ctx)

Used to serialize references to other nodes e.g connections.

Public
SurfaceArea ()

The surface area of the node in square world units.

Public
UpdateRecursiveG (path, pathNode, handler)
Public

Public Variables

connections

Custon non-grid connections from this node.

Public
HasConnectionsToAllEightNeighbours

True if the node has grid connections to all its 8 neighbours.

Public Abstract
NodeInGridIndex

The index of the node in the grid.

Public
TmpWalkable

Temporary variable used internally when updating the graph.

Public
WalkableErosion

Stores walkability before erosion is applied.

Public
XCoordinateInGrid

X coordinate of the node in the grid.

Public
ZCoordinateInGrid

Z coordinate of the node in the grid.

Public

Inherited Public Members

Area

Connected component that contains the node.

Public
DeserializeNode (ctx)

Deserializes the node data from a byte array.

Public
Destroy ()

Destroys the node.

Public
Destroyed
Public
Flags

Holds various bitpacked variables.

Public
GetPortal (other, left, right, backwards)

Add a portal from this node to the specified node.

Public
Graph

Graph which this node belongs to.

Public
GraphIndex

Graph which contains this node.

Public
MaxGraphIndex

Max number of graphs-1.

Public
MaxHierarchicalNodeIndex
Public
NodeIndex

Internal unique index.

Public
Penalty

Penalty cost for walking on this node.

Public
position

Position of the node in world space.

Public
SerializeNode (ctx)

Serialized the node data to a byte array.

Public
SetConnectivityDirty ()

Inform the system that the node's connectivity has changed.

Public
Tag

Node tag.

Public
Walkable

True if the node is traversable.

Public

Private/Protected Members

flags

Bitpacked field holding several pieces of data.

Protected
gridFlags
Protected
GridFlagsWalkableErosionMask
Private
GridFlagsWalkableErosionOffset
Private
GridFlagsWalkableTmpMask
Private
GridFlagsWalkableTmpOffset
Private
GridNodeBase (astar)
Protected
HierarchicalNodeIndex

Hierarchical Node that contains this node.

Package
IsHierarchicalNodeDirty

Some internal bookkeeping.

Package
nodeInGridIndex

Bitfield containing the x and z coordinates of the node as well as the layer (for layered grid graphs).

Protected
NodeInGridIndexLayerOffset
Protected
NodeInGridIndexMask
Protected
TemporaryFlag1

Temporary flag for internal purposes.

Package
TemporaryFlag2

Temporary flag for internal purposes.

Package