Emergency 20 Dokumentation  4.2.0
UnloadPersonFromVehicleAction.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Header guard ]
6 //[-------------------------------------------------------]
7 #pragma once
8 
9 
10 //[-------------------------------------------------------]
11 //[ Includes ]
12 //[-------------------------------------------------------]
13 #include "em5/Export.h"
14 
16 #include <qsf/math/Transform.h>
18 
19 
20 //[-------------------------------------------------------]
21 //[ Namespace ]
22 //[-------------------------------------------------------]
23 namespace em5
24 {
25 
26 
27  //[-------------------------------------------------------]
28  //[ Classes ]
29  //[-------------------------------------------------------]
35  {
36 
37 
38  //[-------------------------------------------------------]
39  //[ Public definitions ]
40  //[-------------------------------------------------------]
41  public:
43 
44  enum State
45  {
48  STATE_END_EFFECT
49  };
50 
51 
52  //[-------------------------------------------------------]
53  //[ Public methods ]
54  //[-------------------------------------------------------]
55  public:
61 
67 
68  void init(qsf::Entity& exitVehicle, uint32 doorType);
69  void init(qsf::Entity& exitVehicle, const glm::vec3& placePosition, const glm::quat& placeRotation, qsf::Time spawnDelay = qsf::Time::ZERO, bool pushAnimation = true, bool enforceUnloading = false);
70 
71 
72  //[-------------------------------------------------------]
73  //[ Public virtual qsf::Actions methods ]
74  //[-------------------------------------------------------]
75  public:
76  virtual void serialize(qsf::BinarySerializer& serializer) override;
77 
78 
79  //[-------------------------------------------------------]
80  //[ Protected virtual qsf::Action methods ]
81  //[-------------------------------------------------------]
82  protected:
83  virtual qsf::action::Result updateAction(const qsf::Clock& clock) override;
84 
85 
86  //[-------------------------------------------------------]
87  //[ Private data ]
88  //[-------------------------------------------------------]
89  private:
90  qsf::WeakPtr<qsf::Entity> mVehicleEntity;
91  qsf::Transform mPlaceTransform;
92  bool mPlaceTransformInitialized;
93  bool mPushAnimation;
94  bool mEnforceUnloading;
95  qsf::Time mSpawnDelay;
96  uint32 mDoorType;
97  State mState;
98 
99 
100  //[-------------------------------------------------------]
101  //[ CAMP reflection system ]
102  //[-------------------------------------------------------]
103  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
104 
105 
106  };
107 
108 
109 //[-------------------------------------------------------]
110 //[ Namespace ]
111 //[-------------------------------------------------------]
112 } // em5
113 
114 
115 //[-------------------------------------------------------]
116 //[ CAMP reflection system ]
117 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Entity class.
Definition: Entity.h:46
unsigned int uint32
Definition: PlatformTypes.h:181
static const qsf::NamedIdentifier ACTION_ID
"em5::UnloadPersonFromVehicleAction" unique action identifier
Definition: UnloadPersonFromVehicleAction.h:42
Clock class.
Definition: Clock.h:33
#define EM5_API_EXPORT
Definition: Export.h:28
static const Time ZERO
A zero value for time.
Definition: Time.h:40
Definition: UnloadPersonFromVehicleAction.h:46
EMERGENCY 5 unload person from vehicle action.
Definition: UnloadPersonFromVehicleAction.h:34
3D transform class
Definition: Transform.h:45
void serialize(BinarySerializer &serializer, BitFlagSet< STORAGE, ENUM > &bitFlagSet)
Definition: BitFlagSet.h:359
State
Definition: ProcessState.h:20
#define QSF_CAMP_RTTI()
Only adds the virtual method "campClassId()", nothing more.
Definition: CampClass.h:75
#define QSF_CAMP_TYPE_NONCOPYABLE(type)
See "CAMP_TYPE_NONCOPYABLE" for details.
Definition: CampClass.h:112
State
Definition: UnloadPersonFromVehicleAction.h:44
Abstract action base class.
Definition: Action.h:59
Class combining strings with their hashes.
Definition: NamedIdentifier.h:34
Binary serializer class.
Definition: BinarySerializer.h:35
Result
Definition: ActionResult.h:20
Definition: UnloadPersonFromVehicleAction.h:47
Data type for encapsulating time information. It might represents points in time and time spans...
Definition: Time.h:32