GameBaseData¶
objects.
- Inherit:
- SimDataBlock
Description¶
Scriptable, demo-able datablock. Used by GameBase objects.
Methods¶
-
void
GameBaseData
::
onAdd
(GameBase obj)¶ Called when the object is added to the scene.
Parameters: obj – the GameBase object Example:
datablock GameBaseData(MyObjectData) { category = "Misc"; }; function MyObjectData::onAdd( %this, %obj ) { echo( "Added " @ %obj.getName() @ " to the scene." ); } function MyObjectData::onNewDataBlock( %this, %obj ) { echo( "Assign " @ %this.getName() @ " datablock to " %obj.getName() ); } function MyObjectData::onRemove( %this, %obj ) { echo( "Removed " @ %obj.getName() @ " to the scene." ); } function MyObjectData::onMount( %this, %obj, %mountObj, %node ) { echo( %obj.getName() @ " mounted to " @ %mountObj.getName() ); } function MyObjectData::onUnmount( %this, %obj, %mountObj, %node ) { echo( %obj.getName() @ " unmounted from " @ %mountObj.getName() ); }
-
void
GameBaseData
::
onMount
(GameBase obj, SceneObject mountObj, int node)¶ Called when the object is mounted to another object in the scene.
Parameters: - obj – the GameBase object being mounted
- mountObj – the object we are mounted to
- node – the mountObj node we are mounted to
-
void
GameBaseData
::
onNewDataBlock
(GameBase obj)¶ Called when the object has a new datablock assigned.
Parameters: obj – the GameBase object
-
void
GameBaseData
::
onRemove
(GameBase obj)¶ Called when the object is removed from the scene.
Parameters: obj – the GameBase object
-
void
GameBaseData
::
onUnmount
(GameBase obj, SceneObject mountObj, int node)¶ Called when the object is unmounted from another object in the scene.
Parameters: - obj – the GameBase object being unmounted
- mountObj – the object we are unmounted from
- node – the mountObj node we are unmounted from