Handles animations on the vehicle model
struct IVehicleAnimation { };
IVehicleSystem.h
virtual ~IVehicleAnimation();
Performs a change of state
virtual bool ChangeState(TVehicleAnimStateId stateId) = 0;
Parameters |
Description |
TVehicleAnimStateId stateId |
An id of the state |
A bool which indicates if the state could be used
The function GetStateId can return an appropriate stateId which can be used as parameter for this function.
Returns the current time in the animation
virtual float GetAnimTime(bool raw = false) = 0;
a value usually between 0 to 1
virtual void GetMemoryUsage(ICrySizer * pSizer) const = 0;
Returns the current animation state
virtual TVehicleAnimStateId GetState() = 0;
A stateId of the current animation state in use
virtual TVehicleAnimStateId GetStateId(const string& name) = 0;
virtual string GetStateName(TVehicleAnimStateId stateId) = 0;
virtual bool Init(IVehicle* pVehicle, const CVehicleParams& table) = 0;
virtual bool IsUsingManualUpdates() = 0;
virtual void Release() = 0;
virtual void Reset() = 0;
Changes the speed of the animation
virtual void SetSpeed(float speed) = 0;
Parameters |
Description |
float speed |
a value between 0 to 1 |
virtual void SetTime(float time, bool force = false) = 0;
Triggers the animation to start
virtual bool StartAnimation() = 0;
A bool which indicates the success
Triggers the animation to stop
virtual void StopAnimation() = 0;
virtual void ToggleManualUpdate(bool isEnabled) = 0;