adds the name of the sequence just completed for simple FSMs and the like. example usage:

function shapeBaseData::onEndSequence(%this, %obj, %slot, %name)
{
   %script = "on" @ %name;
   if(%this.isMethod(%script))
      %this.call(%script, %obj);
}

function fooData::onDeploy(%this,%obj)
{
   error("fooData::onDeploy" SPC %this SPC %obj);
}
This commit is contained in:
Azaezel 2014-05-30 22:49:17 -05:00
parent cd978039ac
commit 11ac92accc
2 changed files with 5 additions and 4 deletions

View file

@ -648,7 +648,7 @@ public:
DECLARE_CALLBACK( void, onCollision, ( ShapeBase* obj, SceneObject* collObj, VectorF vec, F32 len ) );
DECLARE_CALLBACK( void, onDamage, ( ShapeBase* obj, F32 delta ) );
DECLARE_CALLBACK( void, onTrigger, ( ShapeBase* obj, S32 index, bool state ) );
DECLARE_CALLBACK( void, onEndSequence, ( ShapeBase* obj, S32 slot ) );
DECLARE_CALLBACK( void, onEndSequence, (ShapeBase* obj, S32 slot, const String &name));
DECLARE_CALLBACK( void, onForceUncloak, ( ShapeBase* obj, const char* reason ) );
/// @}
};