Emergency 20 Dokumentation  4.2.0
SEKRobotLogic.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/job/JobProxy.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:
42  static const uint32 GAMELOGIC_TYPE_ID; // "em5::SEKRobotLogic" game logic type ID
43 
44 
45  //[-------------------------------------------------------]
46  //[ Public methods ]
47  //[-------------------------------------------------------]
48  public:
49  SEKRobotLogic();
50 
58  uint64 getConnectedTransporterId() const;
59 
67  void setConnectedTransporterId(uint64 transporter);
68 
69 
70  //[-------------------------------------------------------]
71  //[ Private methods ]
72  //[-------------------------------------------------------]
73  private:
74  // Job updates
75  void updateSimulation(const qsf::JobArguments& jobArguments);
76 
77  void onTransporterStartsBurning(const qsf::MessageParameters& parameters);
78 
79 
80  //[-------------------------------------------------------]
81  //[ Public virtual qsf::GameLogic methods ]
82  //[-------------------------------------------------------]
83  public:
84  virtual bool onStartup() override;
85  virtual void onShutdown() override;
86 
87 
88  //[-------------------------------------------------------]
89  //[ Private definitions ]
90  //[-------------------------------------------------------]
91  private:
92  static const uint32 ACTION_PRIORITY;
93 
94 
95  //[-------------------------------------------------------]
96  //[ Private data ]
97  //[-------------------------------------------------------]
98  private:
99  uint64 mConnectedTransporterId;
100  bool mIsIntact;
101  qsf::JobProxy mSimulationJobProxy;
102  qsf::MessageProxy mMessageProxyConnectedTransporterDestroyed;
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
Job proxy class.
Definition: JobProxy.h:51
Message parameters class.
Definition: MessageParameters.h:34
unsigned int uint32
Definition: PlatformTypes.h:181
#define EM5_API_EXPORT
Definition: Export.h:28
SEK robot logic.
Definition: SEKRobotLogic.h:34
Message listener proxy class.
Definition: MessageProxy.h:47
uint64_t uint64
Definition: PlatformTypes.h:184
Job arguments class: holds data to be passed to the called job method by the job manager.
Definition: JobArguments.h:40
#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: SEKRobotLogic.h:42