RaySupreme Script API
 All Data Structures Functions Pages
Public Member Functions
InstanceContext Class Reference

Public Member Functions

bool getBooleanForVariable (string name)
 
float getValueForVariable (string name)
 
string getStringForVariable (string)
 

Detailed Description

The InstanceContext class is used in the InstanceScript( Instance &instance, InstanceContext &context, NodeGraph &graph ) function. This function is used to create or modify Script based Templates. It allows scripts to access variables set by adjectives for the template.

Member Function Documentation

bool InstanceContext::getBooleanForVariable ( string  name)

Returns a boolean value for the named variable. The variable has to be defined inside an adjective for the template.

Parameters
nameThe name of the variable defined in an Variable attrubute of an adjective.
Returns
The boolean value of the variable.
string InstanceContext::getStringForVariable ( string  )

Returns a string value for the named variable. The variable has to be defined inside an adjective for the template.

Parameters
nameThe name of the variable defined in an Variable attribute of an adjective.
Returns
The string value of the variable.
float InstanceContext::getValueForVariable ( string  name)

Returns a float value for the named variable. This function is also used for int variables. The variable has to be defined inside an adjective for the template.

Parameters
nameThe name of the variable defined in an Variable attrubute of an adjective.
Returns
The float value of the variable.