Emergency 20 Dokumentation  4.2.0
DroneTransportLogic.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 
17 
18 
19 //[-------------------------------------------------------]
20 //[ Forward declarations ]
21 //[-------------------------------------------------------]
22 namespace qsf
23 {
24  class Entity;
25 }
26 
27 
28 //[-------------------------------------------------------]
29 //[ Namespace ]
30 //[-------------------------------------------------------]
31 namespace em5
32 {
33 
34 
35  //[-------------------------------------------------------]
36  //[ Classes ]
37  //[-------------------------------------------------------]
43  {
44 
45 
46  //[-------------------------------------------------------]
47  //[ Public definitions ]
48  //[-------------------------------------------------------]
49  public:
50  static const uint32 GAMELOGIC_TYPE_ID; // "em5::DroneTransportLogic" game logic type ID
51 
52 
53  //[-------------------------------------------------------]
54  //[ Public methods ]
55  //[-------------------------------------------------------]
56  public:
62 
63  qsf::Entity* getDroneEntity() const;
64 
65  bool getIsDroneUnitedWithLeader() const;
66  void setIsDroneUnitedWithLeader(bool value);
67 
72  const glm::vec3& getLocalDronePodPosition() const;
73 
74 
75  //[-------------------------------------------------------]
76  //[ Public virtual qsf::GameLogic methods ]
77  //[-------------------------------------------------------]
78  public:
79  virtual bool onStartup() override;
80  virtual void onShutdown() override;
81 
82 
83  //[-------------------------------------------------------]
84  //[ Private methods ]
85  //[-------------------------------------------------------]
86  private:
87  void onTransporterStartsBurning(const qsf::MessageParameters& parameters);
88  void onChangeSelectionSEKDroneTransporter(const qsf::MessageParameters& parameters);
89  glm::vec3 calcClosestPointToBorders(qsf::Entity& entity);
90 
91 
92  //[-------------------------------------------------------]
93  //[ Private data ]
94  //[-------------------------------------------------------]
95  private:
96  qsf::WeakPtr<qsf::Entity> mDroneEntity;
97  bool mIsDroneUnitedWithTransporter;
98  glm::vec3 mLocalDronePodPosition; // The local drone pod (where the drone is located when landed) position relative to transporter pivot
99 
100  // Messages
101  qsf::MessageProxy mOnStartBurningProxy;
102  qsf::MessageProxy mOnSelectionChangeProxy;
103 
104 
105  //[-------------------------------------------------------]
106  //[ CAMP reflection system ]
107  //[-------------------------------------------------------]
108  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
109 
110 
111  };
112 
113 
114 //[-------------------------------------------------------]
115 //[ Namespace ]
116 //[-------------------------------------------------------]
117 } // em5
118 
119 
120 //[-------------------------------------------------------]
121 //[ CAMP reflection system ]
122 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Entity class.
Definition: Entity.h:46
Message parameters class.
Definition: MessageParameters.h:34
unsigned int uint32
Definition: PlatformTypes.h:181
#define EM5_API_EXPORT
Definition: Export.h:28
Message listener proxy class.
Definition: MessageProxy.h:47
Definition: PickupPersonByParamedicAction.h:21
EMERGENCY 5 drone transport logic.
Definition: DroneTransportLogic.h:42
#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
Game logic base class.
Definition: GameLogic.h:44
static const uint32 GAMELOGIC_TYPE_ID
Definition: DroneTransportLogic.h:50