File size: 2,341 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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
class Entity extends ObjectTyped
{
proto native void DisableSimulation(bool disable);
//! Returns whether simulation is disabled
proto native bool GetIsSimulationDisabled();
//! Returns simulation timestamp
proto native int GetSimulationTimeStamp();
//! Return animation phase of animation on object.
proto native float GetAnimationPhase(string animation);
//! Process animation on object. Animation is defined in config file. Wanted animation phase is set to phase.
proto native void SetAnimationPhase(string animation, float phase);
//! Same as SetAnimationPhase, only ignores any animation and sets the phase immediately
void SetAnimationPhaseNow(string animation, float phase)
{
ResetAnimationPhase(animation, phase);
SetAnimationPhase(animation, phase);
}
proto native void ResetAnimationPhase(string animation, float phase);
/**
\brief callback called from C++ when AnimationPhase has started
*/
void OnAnimationPhaseStarted(string animSource, float phase);
//! Returns skeleton's bone index of named proxy selection.
proto native int GetBoneIndex( string proxySelectionName );
//! Returns proxy object that corresponds given bone inside skeleton.
proto native Object GetBoneObject( int boneIndex );
//! Turns on/off invisibility
proto native void SetInvisible(bool invisible);
//! event
void OnInvisibleSet(bool invisible);
/**
\brief On server, entity's transformation is directly changed to targetTransform, on client entity's transformation is interpolated to targetTransform in time deltaT
@param targetTransform
@param deltaT, interpolation time between current transformation and target transformation
\note it's not recommended to call this on client as it can break interpolation process if called on server previously
*/
proto void MoveInTime(vector targetTransform[4], float deltaT);
/**
\brief callback called when entity is moved to world and creating its physics representation
*/
void OnCreatePhysics();
/**
\brief Client event on transformation update from network
@param pos, world space position
@param ypr, world space orientation in radians in form of Yaw/Pitch/Roll
@return true if visual cut (won't do any interpolation) should be done after calling this callback
*/
bool OnNetworkTransformUpdate(out vector pos, out vector ypr);
};
|