Emergency 20 Dokumentation  4.2.0
PlacePersonByFlyingHeliAction.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/audio/AudioProxy.h"
14 
16 
17 
18 //[-------------------------------------------------------]
19 //[ Forward declarations ]
20 //[-------------------------------------------------------]
21 namespace em5
22 {
23  class HelicopterHatchComponent;
24 }
25 
26 
27 //[-------------------------------------------------------]
28 //[ Namespace ]
29 //[-------------------------------------------------------]
30 namespace em5
31 {
32 
33 
34  //[-------------------------------------------------------]
35  //[ Classes ]
36  //[-------------------------------------------------------]
42  {
43 
44 
45  //[-------------------------------------------------------]
46  //[ Public definitions ]
47  //[-------------------------------------------------------]
48  public:
50 
51  enum State
52  {
57  STATE_FINISH
58  };
59 
60 
61  //[-------------------------------------------------------]
62  //[ Public methods ]
63  //[-------------------------------------------------------]
64  public:
70 
76 
81  void init(const glm::vec3& targetPosition);
82 
83 
84  //[-------------------------------------------------------]
85  //[ Public virtual qsf::Actions methods ]
86  //[-------------------------------------------------------]
87  public:
88  virtual void serialize(qsf::BinarySerializer& serializer) override;
89 
90 
91  //[-------------------------------------------------------]
92  //[ Protected virtual qsf::Action methods ]
93  //[-------------------------------------------------------]
94  protected:
95  virtual bool onStartup() override;
96  virtual qsf::action::Result updateAction(const qsf::Clock& clock) override;
97 
98 
99  //[-------------------------------------------------------]
100  //[ Private methods ]
101  //[-------------------------------------------------------]
102  private:
103  bool checkActionCondition(qsf::Entity& targetEntity);
104  void placePersonOnGround();
105 
106 
107  //[-------------------------------------------------------]
108  //[ Private data ]
109  //[-------------------------------------------------------]
110  private:
111  // Configuration
112  State mState;
113  glm::vec3 mTargetPosition;
114 
115  AudioProxy mAudioProxy;
116 
117  qsf::WeakPtr<HelicopterHatchComponent> mHelicopterHatchComponent;
118 
119 
120  //[-------------------------------------------------------]
121  //[ CAMP reflection system ]
122  //[-------------------------------------------------------]
123  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
124 
125 
126  };
127 
128 
129 //[-------------------------------------------------------]
130 //[ Namespace ]
131 //[-------------------------------------------------------]
132 } // em5
133 
134 
135 //[-------------------------------------------------------]
136 //[ CAMP reflection system ]
137 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Definition: PlacePersonByFlyingHeliAction.h:53
Entity class.
Definition: Entity.h:46
Definition: PlacePersonByFlyingHeliAction.h:56
Clock class.
Definition: Clock.h:33
#define EM5_API_EXPORT
Definition: Export.h:28
Definition: PlacePersonByFlyingHeliAction.h:54
Lightweight weak pointer implementation.
Definition: WeakPtr.h:133
EMERGENCY 5 place person by flying heli action.
Definition: PlacePersonByFlyingHeliAction.h:41
void serialize(BinarySerializer &serializer, BitFlagSet< STORAGE, ENUM > &bitFlagSet)
Definition: BitFlagSet.h:359
Definition: PlacePersonByFlyingHeliAction.h:55
State
Definition: ProcessState.h:20
#define QSF_CAMP_RTTI()
Only adds the virtual method "campClassId()", nothing more.
Definition: CampClass.h:75
Extended audio proxy for easier multiplay usage.
Definition: AudioProxy.h:47
#define QSF_CAMP_TYPE_NONCOPYABLE(type)
See "CAMP_TYPE_NONCOPYABLE" for details.
Definition: CampClass.h:112
static const qsf::NamedIdentifier ACTION_ID
"em5::PlacePersonByFlyingHeliAction" unique action identifier
Definition: PlacePersonByFlyingHeliAction.h:49
State
Definition: PlacePersonByFlyingHeliAction.h:51
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