BVB Source Codes

CRYENGINE Show VehicleSeatActionAnimation.h Source code

Return Download CRYENGINE: download VehicleSeatActionAnimation.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. /*************************************************************************
  4.    -------------------------------------------------------------------------
  5.    $Id$
  6.    $DateTime$
  7.    Description: Implements a seat action for triggering animations
  8.  
  9.    -------------------------------------------------------------------------
  10.    History:
  11.    - 20:07:2007: Created by MichaelR
  12.  
  13. *************************************************************************/
  14. #ifndef __VEHICLESEATACTIONANIMATION_H__
  15. #define __VEHICLESEATACTIONANIMATION_H__
  16.  
  17. class CVehiclePartAnimatedJoint;
  18.  
  19. class CVehicleSeatActionAnimation
  20.         : public IVehicleSeatAction
  21. {
  22.         IMPLEMENT_VEHICLEOBJECT
  23. public:
  24.  
  25.         CVehicleSeatActionAnimation();
  26.         ~CVehicleSeatActionAnimation() { Reset(); }
  27.  
  28.         // IVehicleSeatAction
  29.         virtual bool Init(IVehicle* pVehicle, IVehicleSeat* pSeat, const CVehicleParams& table) override;
  30.         virtual void Reset() override;
  31.         virtual void Release() override { delete this; }
  32.  
  33.         virtual void StartUsing(EntityId passengerId) override;
  34.         virtual void ForceUsage() override {}
  35.         virtual void StopUsing() override;
  36.         virtual void OnAction(const TVehicleActionId actionId, int activationMode, float value) override;
  37.  
  38.         virtual void Serialize(TSerialize ser, EEntityAspects aspects) override;
  39.         virtual void PostSerialize() override {}
  40.         virtual void Update(const float deltaTime) override;
  41.  
  42.         virtual void GetMemoryUsage(ICrySizer* s) const override { s->Add(*this); }
  43.         // ~IVehicleSeatAction
  44.  
  45.         virtual void OnVehicleEvent(EVehicleEvent event, const SVehicleEventParams& params) override {}
  46.  
  47. protected:
  48.  
  49.         IVehicle*          m_pVehicle;
  50.         IVehicleAnimation* m_pVehicleAnim;
  51.         EntityId           m_userId;
  52.         TVehicleActionId   m_control[2];
  53.  
  54.         IEntityAudioComponent* m_pIEntityAudioComponent;
  55.  
  56.         float              m_action;
  57.         float              m_prevAction;
  58.         float              m_speed;
  59.         bool               m_manualUpdate;
  60.  
  61. };
  62.  
  63. #endif
  64.  
downloadVehicleSeatActionAnimation.h Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top