Interface used to implement a special behavior that affect the vehicle
struct IVehicleAction : public IVehicleObject { };
IVehicleSystem.h
In example, landing gears on flying vehicles or the entering procedure for the player are implemented as vehicle action.
virtual TVehicleObjectId GetId() = 0;
virtual bool Init(IVehicle* pVehicle, const CVehicleParams& table) = 0;
virtual int OnEvent(int eventType, SVehicleEventParams& eventParams) = 0;
virtual void Release() = 0;
virtual void Reset() = 0;
Serialize the vehicle object
virtual void Serialize(TSerialize ser, EEntityAspects aspects) = 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.