BVB Source Codes

CRYENGINE Show VehicleSeatAnimActions.h Source code

Return Download CRYENGINE: download VehicleSeatAnimActions.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 vehicle seat specific Mannequin actions
  8.  
  9.    -------------------------------------------------------------------------
  10.    History:
  11.    - 06:02:2012: Created by Tom Berry
  12.  
  13. *************************************************************************/
  14. #ifndef __CVEHICLESEATANIMACTIONS_H__
  15. #define __CVEHICLESEATANIMACTIONS_H__
  16.  
  17. #include <ICryMannequin.h>
  18.  
  19. class CVehicleSeatAnimActionEnter : public TAction<SAnimationContext>
  20. {
  21. public:
  22.  
  23.         DEFINE_ACTION("EnterVehicle");
  24.  
  25.         typedef TAction<SAnimationContext> BaseAction;
  26.  
  27.         CVehicleSeatAnimActionEnter(int priority, FragmentID fragmentID, CVehicleSeat* pSeat)
  28.                 :
  29.                 BaseAction(priority, fragmentID),
  30.                 m_pSeat(pSeat)
  31.         {
  32.         }
  33.  
  34.         virtual void Enter() override;
  35.  
  36.         virtual void Exit() override
  37.         {
  38.                 BaseAction::Exit();
  39.  
  40.                 // before sitting down, check if the enter-action is still valid and didn't get interrupted (CE-4209)
  41.                 if (m_pSeat->GetCurrentTransition())
  42.                 {
  43.                         m_pSeat->SitDown();
  44.                 }
  45.         }
  46.  
  47. private:
  48.         CVehicleSeat* m_pSeat;
  49. };
  50.  
  51. class CVehicleSeatAnimActionExit : public TAction<SAnimationContext>
  52. {
  53. public:
  54.  
  55.         DEFINE_ACTION("ExitVehicle");
  56.  
  57.         typedef TAction<SAnimationContext> BaseAction;
  58.  
  59.         CVehicleSeatAnimActionExit(int priority, FragmentID fragmentID, CVehicleSeat* pSeat)
  60.                 :
  61.                 BaseAction(priority, fragmentID),
  62.                 m_pSeat(pSeat)
  63.         {
  64.         }
  65.  
  66.         virtual void Enter() override;
  67.         virtual void Exit() override;
  68.  
  69. private:
  70.         CVehicleSeat* m_pSeat;
  71. };
  72.  
  73. #endif //!__CVEHICLESEATANIMACTIONS_H__
  74.  
downloadVehicleSeatAnimActions.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