Adventure Creator
1.76.2
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 20132022

Public Member Functions  
bool  WillStopAtNextNode (int currentNode) 
Checks if the next node is the final one. More...  
void  RecalculateToCenter (Vector3 startPosition, float maxNodeDistance=1f) 
void  BuildNavPath (Vector3[] pointData) 
Rebuilds the nodes List from an array of points. The first point on the new path will be the GameObject's current position. More...  
int  GetNextNode (int currentNode, int prevNode, bool playerControlled=false, AC_PathType lockedPathType=AC_PathType.ForwardOnly) 
Gets the next node along a path, given the current one. More...  
float  GetLengthToNode (int n) 
Gets the distance along the path from the origin to a particular node More...  
float  GetLengthBetweenNodes (int a, int b) 
Gets the distance along the path from one node to another More...  
float  GetTotalLength () 
Gets the total length of the path More...  
int  GetNearestNode (Vector3 position) 
Gets the index of the node that's nearest to a given position More...  
bool  ReferencesAsset (ActionListAsset actionListAsset) 
List< ActionListAsset >  GetReferencedActionListAssets () 
Public Attributes  
List< Vector3 >  nodes = new List<Vector3>() 
List< NodeCommand >  nodeCommands = new List<NodeCommand>() 
ActionListSource  commandSource 
AC_PathType  pathType = AC_PathType.ForwardOnly 
PathSpeed  pathSpeed 
bool  teleportToStart 
bool  affectY 
float  nodePause 
Protected Member Functions  
void  Awake () 
void  ConnectNodes (int a, int b) 
Vector3[]  SetMaxDistances (Vector3[] pointArray, float maxNodeDistance) 
Protected Attributes  
bool  relativeMode 
Vector3  lastFramePosition 
Properties  
Vector3  Destination [get] 
Transform  Transform [get] 
bool  RelativeMode [get, set] 
Vector3  LastFramePosition [get, set] 
Stores a series of "nodes", which act as waypoints for character movements. Nodes can either be generated ingame by pathfinding algorithms (see NavigationEngine), or by defining them in the Unity Editor. Characters can be made to move along a path in one direction only, backandforth, or choose nodes at random. ActionLists can also be set to run when a character reaches each node.
void AC.Paths.BuildNavPath  (  Vector3[]  pointData  ) 
Rebuilds the nodes List from an array of points. The first point on the new path will be the GameObject's current position.
pointData  An array of position vectors that dictate the new path 
float AC.Paths.GetLengthBetweenNodes  (  int  a, 
int  b  
) 
Gets the distance along the path from one node to another
a  The node to start from 
b  The node to reach 
float AC.Paths.GetLengthToNode  (  int  n  ) 
Gets the distance along the path from the origin to a particular node
n  The index number of the node to check the distance to 
int AC.Paths.GetNearestNode  (  Vector3  position  ) 
Gets the index of the node that's nearest to a given position
position  The position to query 
int AC.Paths.GetNextNode  (  int  currentNode, 
int  prevNode,  
bool  playerControlled = false , 

AC_PathType  lockedPathType = AC_PathType.ForwardOnly 

) 
Gets the next node along a path, given the current one.
currentNode  The index number of the current node 
prevNode  The index number of the previous node (used for determining the direction along which the path is being traversed) 
playerControlled  True if the Player is moving along the path during gameplay 
lockedPathType  The type of Path, if the Player is moving along it during gameplay 
float AC.Paths.GetTotalLength  (  ) 
Gets the total length of the path
bool AC.Paths.WillStopAtNextNode  (  int  currentNode  ) 
Checks if the next node is the final one.
currentNode  The index number of the current node (i.e. the node before the one being checked) 
bool AC.Paths.affectY 
If True, then characters will attempt to move vertically to reach nodes
ActionListSource AC.Paths.commandSource 
The source of ActionList objects that are run when nodes are reached (InScene, AssetFile)
List<NodeCommand> AC.Paths.nodeCommands = new List<NodeCommand>() 
A List of NodeCommand instances that dictate what ActionList is run when each node is reached
float AC.Paths.nodePause 
The time, in seconds, that a character will wait at each node before continuing along the path
List<Vector3> AC.Paths.nodes = new List<Vector3>() 
A List of nodes (Vector3) that define the path
PathSpeed AC.Paths.pathSpeed 
The speed at which characters will traverse a path (Walk, Run)
AC_PathType AC.Paths.pathType = AC_PathType.ForwardOnly 
The way in which characters move between each node (ForwardOnly, Loop, PingPong, IsRandom)
bool AC.Paths.teleportToStart 
If True, then the character will teleport to the first node before traversing the path

get 
Gets the position of the last node in the Path

get 
A cache of the Path's transform component