Emergency 20 Dokumentation  4.2.0
DLKDeployAction.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 
17 
18 //[-------------------------------------------------------]
19 //[ Forward declarations ]
20 //[-------------------------------------------------------]
21 namespace qsf
22 {
23  class GameLogicComponent;
24 }
25 
26 
27 //[-------------------------------------------------------]
28 //[ Namespace ]
29 //[-------------------------------------------------------]
30 namespace em5
31 {
32 
33 
34  //[-------------------------------------------------------]
35  //[ Classes ]
36  //[-------------------------------------------------------]
45  {
46 
47 
48  //[-------------------------------------------------------]
49  //[ Public definitions ]
50  //[-------------------------------------------------------]
51  public:
53 
54  enum State
55  {
59  STATE_DONE
60  };
61 
62 
63  //[-------------------------------------------------------]
64  //[ Public methods ]
65  //[-------------------------------------------------------]
66  public:
72 
77  virtual ~DLKDeployAction();
78 
83  void init(uint64 targetEntityId);
84 
89  uint64 getTargetEntityId() const;
90 
91 
92  //[-------------------------------------------------------]
93  //[ Public virtual qsf::Actions methods ]
94  //[-------------------------------------------------------]
95  public:
96  virtual void serialize(qsf::BinarySerializer& serializer) override;
97 
98 
99  //[-------------------------------------------------------]
100  //[ Protected virtual qsf::Action methods ]
101  //[-------------------------------------------------------]
102  protected:
103  virtual bool onStartup() override;
104  virtual qsf::action::Result updateAction(const qsf::Clock& clock) override;
105 
106 
107  //[-------------------------------------------------------]
108  //[ Private methods ]
109  //[-------------------------------------------------------]
110  private:
111  void updateGameLogicComponent();
112  const glm::vec3& getTargetPosition(qsf::Entity& targetEntity) const;
113 
114 
115  //[-------------------------------------------------------]
116  //[ Private data ]
117  //[-------------------------------------------------------]
118  private:
119  uint64 mTargetEntityId;
120  State mCurrentState;
121  qsf::GameLogicComponent* mGameLogicComponent;
122 
123 
124  //[-------------------------------------------------------]
125  //[ CAMP reflection system ]
126  //[-------------------------------------------------------]
127  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
128 
129 
130  };
131 
132 
133 //[-------------------------------------------------------]
134 //[ Namespace ]
135 //[-------------------------------------------------------]
136 } // em5
137 
138 
139 //[-------------------------------------------------------]
140 //[ CAMP reflection system ]
141 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
EMERGENCY 5 DLK deploy action.
Definition: DLKDeployAction.h:44
Entity class.
Definition: Entity.h:46
Clock class.
Definition: Clock.h:33
#define EM5_API_EXPORT
Definition: Export.h:28
Game logic component class.
Definition: GameLogicComponent.h:45
uint64_t uint64
Definition: PlatformTypes.h:184
Definition: DLKDeployAction.h:58
void serialize(BinarySerializer &serializer, BitFlagSet< STORAGE, ENUM > &bitFlagSet)
Definition: BitFlagSet.h:359
Definition: PickupPersonByParamedicAction.h:21
Definition: DLKDeployAction.h:56
State
Definition: ProcessState.h:20
#define QSF_CAMP_RTTI()
Only adds the virtual method "campClassId()", nothing more.
Definition: CampClass.h:75
Definition: DLKDeployAction.h:57
#define QSF_CAMP_TYPE_NONCOPYABLE(type)
See "CAMP_TYPE_NONCOPYABLE" for details.
Definition: CampClass.h:112
Abstract action base class.
Definition: Action.h:59
Class combining strings with their hashes.
Definition: NamedIdentifier.h:34
static const qsf::NamedIdentifier ACTION_ID
"em5::DLKDeployAction" unique action identifier
Definition: DLKDeployAction.h:52
State
Definition: DLKDeployAction.h:54
Binary serializer class.
Definition: BinarySerializer.h:35
Result
Definition: ActionResult.h:20