Catlike Coding
Unity Code Documentation
Public Member Functions | Public Attributes | Properties | List of all members
CatlikeCoding.NumberFlow.DiagramNode Class Reference

Node of a NumberFlow diagram. More...

Public Member Functions

void Compute ()
 Compute the current value of the node. More...
 
Color ComputeColor ()
 Compute the current value of the node and directly return the color value. More...
 
string GetPropertyName (int index)
 Get the name of a property. More...
 
void Init (Diagram diagram)
 Initialize the node. Will be invoked by its diagram. More...
 
bool IsDependentOn (DiagramNode otherNode)
 Determine whether this node is dependent on another node. Used to prevent loops while editing a diagram. More...
 
void Prepare (Diagram diagram)
 Prepare the node for usage. Will be called by its diagram. More...
 

Public Attributes

int[] argumentIndices
 Argument node indices. More...
 
Value[] fixedValues
 Fixed argument values. More...
 
string functionId
 Function identifier. More...
 
Vector2 position
 Canvas position. More...
 

Properties

Diagram Diagram [get]
 Get the diagram that this node belongs to. More...
 
Function Function [get]
 Get the function. More...
 
string InputName [get]
 Get the input name, if applicable. More...
 
string Name [get]
 Get the name. More...
 
int PropertyCount [get]
 Get the property count. More...
 
string TypeName [get]
 Get the type name. More...
 

Detailed Description

Node of a NumberFlow diagram.

Should only be used by diagrams and their editor scripts. Do not touch it.

Member Function Documentation

void CatlikeCoding.NumberFlow.DiagramNode.Compute ( )

Compute the current value of the node.

Color CatlikeCoding.NumberFlow.DiagramNode.ComputeColor ( )

Compute the current value of the node and directly return the color value.

Returns
Computed color.
string CatlikeCoding.NumberFlow.DiagramNode.GetPropertyName ( int  index)

Get the name of a property.

Returns
Property name.
Parameters
indexProperty index.
void CatlikeCoding.NumberFlow.DiagramNode.Init ( Diagram  diagram)

Initialize the node. Will be invoked by its diagram.

Parameters
diagramDiagram the node is a part of.
bool CatlikeCoding.NumberFlow.DiagramNode.IsDependentOn ( DiagramNode  otherNode)

Determine whether this node is dependent on another node. Used to prevent loops while editing a diagram.

Returns
Whether the dependency exists.
Parameters
otherNodeAnother node.
void CatlikeCoding.NumberFlow.DiagramNode.Prepare ( Diagram  diagram)

Prepare the node for usage. Will be called by its diagram.

Parameters
diagramDiagram the node is part of.

Member Data Documentation

int [] CatlikeCoding.NumberFlow.DiagramNode.argumentIndices

Argument node indices.

Value [] CatlikeCoding.NumberFlow.DiagramNode.fixedValues

Fixed argument values.

string CatlikeCoding.NumberFlow.DiagramNode.functionId

Function identifier.

Vector2 CatlikeCoding.NumberFlow.DiagramNode.position

Canvas position.

Property Documentation

Diagram CatlikeCoding.NumberFlow.DiagramNode.Diagram
get

Get the diagram that this node belongs to.

The diagram.

Function CatlikeCoding.NumberFlow.DiagramNode.Function
get

Get the function.

Function.

string CatlikeCoding.NumberFlow.DiagramNode.InputName
get

Get the input name, if applicable.

Name of the input, or null.

string CatlikeCoding.NumberFlow.DiagramNode.Name
get

Get the name.

Name.

int CatlikeCoding.NumberFlow.DiagramNode.PropertyCount
get

Get the property count.

Property count.

string CatlikeCoding.NumberFlow.DiagramNode.TypeName
get

Get the type name.

Name of the type.