Interface used to implement interactive elements for the player passenger
struct IVehicleSeatAction : public IVehicleObject { string m_name; };
IVehicleSystem.h
The tank turret, headlights, vehicle weapons and steering wheels are all examples of vehicle seat actions.
string m_name;
virtual void ForceUsage() = 0;
virtual TVehicleObjectId GetId() = 0;
virtual void GetMemoryUsage(ICrySizer * pSizer) const = 0;
virtual const char* GetName() const;
virtual bool Init(IVehicle* pVehicle, IVehicleSeat* pSeat, const CVehicleParams& table) = 0;
virtual void OnAction(const TVehicleActionId actionId, int activationMode, float value) = 0;
virtual void OnSpawnComplete();
virtual void PostSerialize() = 0;
virtual void PrePhysUpdate(const float dt);
virtual void Release() = 0;
virtual void Reset() = 0;
Serialize the vehicle object
virtual void Serialize(TSerialize ser, EEntityAspects aspects) = 0;
virtual void StartUsing(EntityId passengerId) = 0;
virtual void StopUsing() = 0;
Update the vehicle object
virtual void Update(const float deltaTime) = 0;
Parameters |
Description |
const float deltaTime |
total time for the update, in seconds |
Used to handle any time sensitive updates. In example, rotation for turret parts is implemented in this function.