Main   GitHub

Methods | List of all members
BehaviorTemplate Class Reference

Inherits SimObject, and SimObject.

Methods

bool addBehaviorField (fieldName, desc, type,[defaultValue, userData])
 
bool addBehaviorField (fieldName, desc, type,[defaultValue, userData])
 
bool addBehaviorInput (inputName, label, description)
 
bool addBehaviorInput (inputName, label, description)
 
bool addBehaviorOutput (outputName, label, description)
 
bool addBehaviorOutput (outputName, label, description)
 
int createInstance ()
 
int createInstance ()
 
string getBehaviorField (int fieldIndex)
 
string getBehaviorField (int fieldIndex)
 
int getBehaviorFieldCount ()
 
int getBehaviorFieldCount ()
 
string getBehaviorFieldDescription (int fieldIndex)
 
string getBehaviorFieldDescription (int fieldIndex)
 
string getBehaviorFieldUserData (int fieldIndex)
 
string getBehaviorFieldUserData (int fieldIndex)
 
string getBehaviorInput (int inputIndex)
 
string getBehaviorInput (int inputIndex)
 
int getBehaviorInputCount ()
 
int getBehaviorInputCount ()
 
string getBehaviorOutput (int outputIndex)
 
string getBehaviorOutput (int outputIndex)
 
int getBehaviorOutputCount ()
 
int getBehaviorOutputCount ()
 
bool hasBehaviorInput (inputName)
 
bool hasBehaviorInput (inputName)
 
bool hasBehaviorOutput (outputName)
 
bool hasBehaviorOutput (outputName)
 
- Methods inherited from SimObject
void addFieldFilter (fieldName)
 
void addFieldFilter (fieldName)
 
string call (%args)
 
string call (%args)
 
int clone ([bool copyDynamicFields?=false])
 
int clone ([bool copyDynamicFields?=false])
 
void delete ()
 
void delete ()
 
void dump ()
 
void dump ()
 
void dumpClassHierarchy ()
 
void dumpClassHierarchy ()
 
string getClassName ()
 
string getClassName ()
 
string getClassNamespace ()
 
string getClassNamespace ()
 
string getDynamicField (index)
 
string getDynamicField (index)
 
int getDynamicFieldCount ()
 
int getDynamicFieldCount ()
 
string getField (int index)
 
string getField (int index)
 
int getFieldCount ()
 
int getFieldCount ()
 
string getFieldType (fieldName)
 
string getFieldType (fieldName)
 
string getFieldValue (fieldName)
 
string getFieldValue (fieldName)
 
int getGroup ()
 
int getGroup ()
 
int getId ()
 
int getId ()
 
string getInternalName ()
 
string getInternalName ()
 
string getName ()
 
string getName ()
 
string getProgenitorFile ()
 
string getProgenitorFile ()
 
string getSuperClassNamespace ()
 
string getSuperClassNamespace ()
 
int getType ()
 
int getType ()
 
bool isChildOfGroup ()
 
bool isChildOfGroup ()
 
bool isMemberOfClass (string classname)
 
bool isMemberOfClass (string classname)
 
bool isMethod (string method name)
 
bool isMethod (string method name)
 
bool isTimerActive ()
 
bool isTimerActive ()
 
void removeFieldFilter (fieldName)
 
void removeFieldFilter (fieldName)
 
bool save (fileName,[selectedOnly])
 
bool save (fileName,[selectedOnly])
 
int schedule (time, command,< arg1...argN >)
 
int schedule (time, command,< arg1...argN >)
 
void setClassNamespace ()
 
void setClassNamespace ()
 
bool setFieldValue (fieldName, value)
 
bool setFieldValue (fieldName, value)
 
void setInternalName ()
 
void setInternalName ()
 
void setName (newName)
 
void setName (newName)
 
void setProgenitorFile (file)
 
void setProgenitorFile (file)
 
void setSuperClassNamespace ()
 
void setSuperClassNamespace ()
 
bool startTimer (callbackFunction, float timePeriod,[repeat])
 
bool startTimer (callbackFunction, float timePeriod,[repeat])
 
void stopTimer ()
 
void stopTimer ()
 

Fields

Behavior
caseString friendlyName
 
caseString description
 
string behaviorType
 
SimBase
bool canSaveDynamicFields
 
string internalName
 
SimObjectPtr parentGroup
 
Namespace Linking
string superclass
 
string class
 
- Fields inherited from SimObject
bool canSaveDynamicFields
 
string internalName
 
SimObjectPtr parentGroup
 
string superclass
 
string class
 

Methods

bool BehaviorTemplate::addBehaviorField ( fieldName  ,
desc  ,
type   
)

Adds a named BehaviorField to a Behavior Template

Parameters
fieldNameThe name of this field
descThe Description of this field
typeThe DataType for this field (default, int, float, Point2F, bool, enum, Object, keybind, color)
defaultValueThe Default value for this field
userDataAn extra data field that can be used for custom data on a per-field basis
Usage for default types
-enum: a TAB separated list of possible values
-object: the scene-object type that are valid choices for the field. The object types observe inheritance, so if you have a SceneObject field you will be able to choose t2dStaticSrpites, t2dAnimatedSprites, etc.
Returns
Whether the field was added or not.
bool BehaviorTemplate::addBehaviorField ( fieldName  ,
desc  ,
type   
)

Adds a named BehaviorField to a Behavior Template

Parameters
fieldNameThe name of this field
descThe Description of this field
typeThe DataType for this field (default, int, float, Point2F, bool, enum, Object, keybind, color)
defaultValueThe Default value for this field
userDataAn extra data field that can be used for custom data on a per-field basis
Usage for default types
-enum: a TAB separated list of possible values
-object: the scene-object type that are valid choices for the field. The object types observe inheritance, so if you have a SceneObject field you will be able to choose t2dStaticSrpites, t2dAnimatedSprites, etc.
Returns
Whether the field was added or not.
bool BehaviorTemplate::addBehaviorInput ( inputName  ,
label  ,
description   
)
  • Adds a behavior input.
    Parameters
    inputNameThe input name to use.
    labelThe short label name to show in the editor.
    descriptionThe long description to show in the editor.
    Returns
    Whether the input was added or not.
bool BehaviorTemplate::addBehaviorInput ( inputName  ,
label  ,
description   
)
  • Adds a behavior input.
    Parameters
    inputNameThe input name to use.
    labelThe short label name to show in the editor.
    descriptionThe long description to show in the editor.
    Returns
    Whether the input was added or not.
bool BehaviorTemplate::addBehaviorOutput ( outputName  ,
label  ,
description   
)
  • Adds a behavior output.
    Parameters
    outputNameThe output name to use.
    labelThe short label name to show in the editor.
    descriptionThe long description to show in the editor.
    Returns
    Whether the output was added or not.
bool BehaviorTemplate::addBehaviorOutput ( outputName  ,
label  ,
description   
)
  • Adds a behavior output.
    Parameters
    outputNameThe output name to use.
    labelThe short label name to show in the editor.
    descriptionThe long description to show in the editor.
    Returns
    Whether the output was added or not.
int BehaviorTemplate::createInstance ( )
  • Create an instance of this behavior.
    Returns
    (BehaviorInstance inst) The behavior instance created
int BehaviorTemplate::createInstance ( )
  • Create an instance of this behavior.
    Returns
    (BehaviorInstance inst) The behavior instance created
string BehaviorTemplate::getBehaviorField ( int  fieldIndex)
  • Gets a tab-delimited description of the behavior field.
    Parameters
    fieldIndexThe index of the behavior field.
    Returns
    A tab-delimited description of the behavior field of the format <Name><Type><DefaultValue> or an empty string if behavior field is not found.
string BehaviorTemplate::getBehaviorField ( int  fieldIndex)
  • Gets a tab-delimited description of the behavior field.
    Parameters
    fieldIndexThe index of the behavior field.
    Returns
    A tab-delimited description of the behavior field of the format <Name><Type><DefaultValue> or an empty string if behavior field is not found.
int BehaviorTemplate::getBehaviorFieldCount ( )
  • Get the number of behavior fields.
    Returns
    Returns the number of behavior fields.
int BehaviorTemplate::getBehaviorFieldCount ( )
  • Get the number of behavior fields.
    Returns
    Returns the number of behavior fields.
string BehaviorTemplate::getBehaviorFieldDescription ( int  fieldIndex)
  • Gets the description of the field.
    Parameters
    fieldIndexThe index of the behavior field.
    Returns
    Returns the field description.
string BehaviorTemplate::getBehaviorFieldDescription ( int  fieldIndex)
  • Gets the description of the field.
    Parameters
    fieldIndexThe index of the behavior field.
    Returns
    Returns the field description.
string BehaviorTemplate::getBehaviorFieldUserData ( int  fieldIndex)
  • Gets the UserData associated with a field by index in the field list
    Parameters
    fieldIndexThe index of the behavior field.
    Returns
    Returns a string representing the user data of this field
string BehaviorTemplate::getBehaviorFieldUserData ( int  fieldIndex)
  • Gets the UserData associated with a field by index in the field list
    Parameters
    fieldIndexThe index of the behavior field.
    Returns
    Returns a string representing the user data of this field
string BehaviorTemplate::getBehaviorInput ( int  inputIndex)
  • Gets a comma-delimited description of the behavior input.
    Parameters
    inputIndexThe index of the behavior input.
    Returns
    A comma-delimited description of the behavior input of the format <Name>,<Label><,Description> or an empty string if behavior input is not found.
string BehaviorTemplate::getBehaviorInput ( int  inputIndex)
  • Gets a comma-delimited description of the behavior input.
    Parameters
    inputIndexThe index of the behavior input.
    Returns
    A comma-delimited description of the behavior input of the format <Name>,<Label><,Description> or an empty string if behavior input is not found.
int BehaviorTemplate::getBehaviorInputCount ( )
  • Get the number of behavior inputs.
    Returns
    Returns the number of behavior inputs.
int BehaviorTemplate::getBehaviorInputCount ( )
  • Get the number of behavior inputs.
    Returns
    Returns the number of behavior inputs.
string BehaviorTemplate::getBehaviorOutput ( int  outputIndex)
  • Gets a comma-delimited description of the behavior output.
    Parameters
    outputIndexThe index of the behavior output.
    Returns
    A comma-delimited description of the behavior output of the format <Name>,<Label><,Description> or an empty string if behavior output is not found.
string BehaviorTemplate::getBehaviorOutput ( int  outputIndex)
  • Gets a comma-delimited description of the behavior output.
    Parameters
    outputIndexThe index of the behavior output.
    Returns
    A comma-delimited description of the behavior output of the format <Name>,<Label><,Description> or an empty string if behavior output is not found.
int BehaviorTemplate::getBehaviorOutputCount ( )
  • Get the number of behavior outputs.
    Returns
    Returns the number of behavior outputs.
int BehaviorTemplate::getBehaviorOutputCount ( )
  • Get the number of behavior outputs.
    Returns
    Returns the number of behavior outputs.
bool BehaviorTemplate::hasBehaviorInput ( inputName  )
  • Gets whether the behavior has the behavior input or not.
    Parameters
    inputNameThe input name to check.
    Returns
    Whether the behavior has the behavior input or not.
bool BehaviorTemplate::hasBehaviorInput ( inputName  )
  • Gets whether the behavior has the behavior input or not.
    Parameters
    inputNameThe input name to check.
    Returns
    Whether the behavior has the behavior input or not.
bool BehaviorTemplate::hasBehaviorOutput ( outputName  )
  • Gets whether the behavior has the behavior output or not.
    Parameters
    outputNameThe output name to check.
    Returns
    Whether the behavior has the behavior output or not.
bool BehaviorTemplate::hasBehaviorOutput ( outputName  )
  • Gets whether the behavior has the behavior output or not.
    Parameters
    outputNameThe output name to check.
    Returns
    Whether the behavior has the behavior output or not.

Member Data Documentation

string BehaviorTemplate::behaviorType

?? Organizational keyword ??

bool BehaviorTemplate::canSaveDynamicFields
string BehaviorTemplate::class

Script SuperClass of object.

caseString BehaviorTemplate::description

The description of this behavior.

caseString BehaviorTemplate::friendlyName

Human friendly name of this behavior

string BehaviorTemplate::internalName
SimObjectPtr BehaviorTemplate::parentGroup

Group hierarchy parent of the object.

string BehaviorTemplate::superclass

Script Class of object.



Copyright © 2013 GarageGames, LLC. All Rights Reserved.