File size: 1,242 Bytes
24b81cb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
//! base class of all commands exposed to script to provide common functionality over animations
class AnimCommandBase
{
// These would be private if not for the scripted commands
// As other commands lifetime are handled internally
protected void AnimCommandBase() {}
protected void ~AnimCommandBase() {}
//! returns entity that this command is bount to
proto native IEntity GetEntity();
//! called when command starts
void OnActivate() {}
//! called when command ends
void OnDeactivate() {}
//! called before any animation is processed
//! here change animation values, add animation commands
void PreAnimUpdate(float pDt) {}
//! after animation is processed, before physics is processed
//! here you can listen to various events
void PrePhysUpdate(float pDt) {}
//! functions usable only from OnActivate or PreAnimUpdate
proto native void PreAnim_CallCommand(int pCommand, int pParamInt, float pParamFloat);
proto native void PreAnim_SetFloat(int pVar, float pFlt);
proto native void PreAnim_SetInt(int pVar, int pInt);
proto native void PreAnim_SetBool(int pVar, bool pBool);
//! functions usable in PrePhysUpdate
proto native bool PrePhys_IsEvent(int pEvent);
proto native bool PrePhys_IsTag(int pTag);
}
|