Emergency 20 Dokumentation  4.2.0
EscapeFootShortAction.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 //[-------------------------------------------------------]
14 
15 
16 //[-------------------------------------------------------]
17 //[ Namespace ]
18 //[-------------------------------------------------------]
19 namespace em5
20 {
21 
22 
23  //[-------------------------------------------------------]
24  //[ Classes ]
25  //[-------------------------------------------------------]
31  {
32 
33 
34  //[-------------------------------------------------------]
35  //[ Public definitions ]
36  //[-------------------------------------------------------]
37  public:
39 
40 
41  //[-------------------------------------------------------]
42  //[ Public methods ]
43  //[-------------------------------------------------------]
44  public:
50 
55  virtual ~EscapeFootShortAction();
56 
61  void init(const std::string& escapeTargetTag);
62 
67  virtual void catched() override;
68 
69 
70  //[-------------------------------------------------------]
71  //[ Public virtual qsf::Action methods ]
72  //[-------------------------------------------------------]
73  public:
74  virtual void serialize(qsf::BinarySerializer& serializer) override;
75  virtual void onShutdown() override;
76 
77 
78  //[-------------------------------------------------------]
79  //[ Protected virtual qsf::Action methods ]
80  //[-------------------------------------------------------]
81  protected:
82  virtual qsf::action::Result updateAction(const qsf::Clock& clock) override;
83 
84 
85  //[-------------------------------------------------------]
86  //[ Private methods ]
87  //[-------------------------------------------------------]
88  private:
89  glm::vec3 getClosestTargetPoint(bool onlyMapExits);
90 
91 
92  //[-------------------------------------------------------]
93  //[ Private data ]
94  //[-------------------------------------------------------]
95  private:
96  qsf::Time mElapsedTime;
97  qsf::Time mPhaseEndTime;
98  glm::vec3 mTargetPosition;
99 
100 
101  //[-------------------------------------------------------]
102  //[ CAMP reflection system ]
103  //[-------------------------------------------------------]
104  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
105 
106 
107  };
108 
109 
110 //[-------------------------------------------------------]
111 //[ Namespace ]
112 //[-------------------------------------------------------]
113 } // em5
114 
115 
116 //[-------------------------------------------------------]
117 //[ CAMP reflection system ]
118 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Clock class.
Definition: Clock.h:33
#define EM5_API_EXPORT
Definition: Export.h:28
EMERGENCY 5 escape foot short action.
Definition: EscapeFootShortAction.h:30
static const qsf::NamedIdentifier ACTION_ID
"em5::EscapeFootShortAction" unique action identifier
Definition: EscapeFootShortAction.h:38
EMERGENCY 5 base escape action.
Definition: EscapeAction.h:41
void serialize(BinarySerializer &serializer, BitFlagSet< STORAGE, ENUM > &bitFlagSet)
Definition: BitFlagSet.h:359
#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
Class combining strings with their hashes.
Definition: NamedIdentifier.h:34
Binary serializer class.
Definition: BinarySerializer.h:35
Result
Definition: ActionResult.h:20
Data type for encapsulating time information. It might represents points in time and time spans...
Definition: Time.h:32