All Classes Namespaces Functions Variables Enumerations Enumerator Properties
plyCommon.plyGraphManager Class Reference

Contains the graphs that can be executed at runtime and the functions to interact with the graphs. More...

Inherits MonoBehaviour.

Public Member Functions

void LoadGraphs ()
 
plyGraph GetGraphByName (string name)
 
plyGraph GetGraphByIdent (string customIdent)
 
plyGraph GetGraph (UniqueID id)
 
void BeginGraph (plyGraph g)
 Begin walking the graph. Will begin at the Start node. More...
 
void UpdateGraph ()
 Force the active graph to update. More...
 
void StopGraph ()
 Force the active graph to stop if any is active. More...
 
plyGraph ActiveGraph ()
 Returns the active graph. Null if no graph is running. More...
 
plyNode ActiveNode ()
 The currently active node in the active graph. More...
 
plyNode NodeWaitingForData ()
 Returns the node that is waiting for a response. You will use SendDataToNode() to send the response data to it. Will return null if there is no node waiting for data or if there is no graph running atm. More...
 
void SendDataToNode (object data)
 Send data to the current node in the active graph. What data is send will depend on what node is waiting for it. Example, can be used to send data to a dialogue node that might be waiting for a user to make a choice. In that case you would send an Integer Value. The data will simply be ignore if the node was not one that accepts data. More...
 
plyMetaData GetMetaData (string name)
 Return reference to meta data object. Null if not found. More...
 
object GetMetaDataValue (string name)
 Return meta data value. Null if named meta data not found. More...
 
void SetMetaDataValue (string name, object val)
 Set meta data value. Will create the named meta data if not found and then set value. More...
 

Public Attributes

List< plyGraphgraphs = new List<plyGraph>()
 The graphs More...
 
plyMetaData[] metaData = new plyMetaData[0]
 Meta data is optional data/ information that the designer may associate with the graph asset (via Graphs Settings). Do not access this at runtime. Use the provided functions. More...
 
int __last_node_id = 0
 For internal use. Do not manipulate. More...
 

Protected Member Functions

void Awake ()
 
void Update ()
 

Properties

Dictionary< string, plyMetaDataruntimeMetaData [get, set]
 

Detailed Description

Contains the graphs that can be executed at runtime and the functions to interact with the graphs.

Member Function Documentation

plyGraph plyCommon.plyGraphManager.ActiveGraph ( )

Returns the active graph. Null if no graph is running.

plyNode plyCommon.plyGraphManager.ActiveNode ( )

The currently active node in the active graph.

void plyCommon.plyGraphManager.BeginGraph ( plyGraph  g)

Begin walking the graph. Will begin at the Start node.

plyMetaData plyCommon.plyGraphManager.GetMetaData ( string  name)

Return reference to meta data object. Null if not found.

object plyCommon.plyGraphManager.GetMetaDataValue ( string  name)

Return meta data value. Null if named meta data not found.

plyNode plyCommon.plyGraphManager.NodeWaitingForData ( )

Returns the node that is waiting for a response. You will use SendDataToNode() to send the response data to it. Will return null if there is no node waiting for data or if there is no graph running atm.

void plyCommon.plyGraphManager.SendDataToNode ( object  data)

Send data to the current node in the active graph. What data is send will depend on what node is waiting for it. Example, can be used to send data to a dialogue node that might be waiting for a user to make a choice. In that case you would send an Integer Value. The data will simply be ignore if the node was not one that accepts data.

void plyCommon.plyGraphManager.SetMetaDataValue ( string  name,
object  val 
)

Set meta data value. Will create the named meta data if not found and then set value.

void plyCommon.plyGraphManager.StopGraph ( )

Force the active graph to stop if any is active.

void plyCommon.plyGraphManager.UpdateGraph ( )

Force the active graph to update.

Member Data Documentation

int plyCommon.plyGraphManager.__last_node_id = 0

For internal use. Do not manipulate.

List<plyGraph> plyCommon.plyGraphManager.graphs = new List<plyGraph>()

The graphs

plyMetaData [] plyCommon.plyGraphManager.metaData = new plyMetaData[0]

Meta data is optional data/ information that the designer may associate with the graph asset (via Graphs Settings). Do not access this at runtime. Use the provided functions.