Emergency 20 Dokumentation  4.2.0
GangsterDemoArsonist.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 
16 
17 
18 //[-------------------------------------------------------]
19 //[ Namespace ]
20 //[-------------------------------------------------------]
21 namespace em5
22 {
23 
24 
25  //[-------------------------------------------------------]
26  //[ Classes ]
27  //[-------------------------------------------------------]
33  {
34 
35 
36  //[-------------------------------------------------------]
37  //[ Public definitions ]
38  //[-------------------------------------------------------]
39  public:
40  static const uint32 GAMELOGIC_TYPE_ID; // "em5::GangsterDemoArsonist" game logic type ID
41 
42 
43  //[-------------------------------------------------------]
44  //[ Public methods ]
45  //[-------------------------------------------------------]
46  public:
48  void setWaitTimeBeforeEscape(qsf::Time time);
49 
50 
51  //[-------------------------------------------------------]
52  //[ Public virtual qsf::GameLogic methods ]
53  //[-------------------------------------------------------]
54  public:
55  virtual bool onStartup() override;
56 
57 
58  //[-------------------------------------------------------]
59  //[ Protected virtual em5::GangsterBaseLogic methods ]
60  //[-------------------------------------------------------]
61  protected:
62  void onSimulationUpdate(const qsf::JobArguments& jobArguments) override;
63  void onIdle() override;
64  void onUnitsSpotted(std::vector<SpottedUnit>& sightedPoliceUnits) override;
65  void onNoUnitsSpotted() override;
66  void onWaypointReached(const Waypoint& waypoint) override;
67 
68 
69  //[-------------------------------------------------------]
70  //[ Private methods ]
71  //[-------------------------------------------------------]
72  private:
73  void onStartFireMessage(const qsf::MessageParameters& parameters);
74 
75 
76  //[-------------------------------------------------------]
77  //[ Private data ]
78  //[-------------------------------------------------------]
79  private:
80  qsf::Time mWaitTimeBeforeEscape;
81 
82  enum State
83  {
84  STATE_INIT
85  };
86  State mState;
87 
88  qsf::MessageProxy mStartFireMessageProxy;
89 
90 
91  //[-------------------------------------------------------]
92  //[ CAMP reflection system ]
93  //[-------------------------------------------------------]
94  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
95 
96 
97  };
98 
99 
100 //[-------------------------------------------------------]
101 //[ Namespace ]
102 //[-------------------------------------------------------]
103 } // em5
104 
105 
106 //[-------------------------------------------------------]
107 //[ CAMP reflection system ]
108 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
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
Game logic for gangster type used in "Demonstration" Emergency 2017 campaign mini-event.
Definition: GangsterDemoArsonist.h:32
Job arguments class: holds data to be passed to the called job method by the job manager.
Definition: JobArguments.h:40
State
Definition: ProcessState.h:20
#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
Base game logic for gangster.
Definition: GangsterBaseLogic.h:52
static const uint32 GAMELOGIC_TYPE_ID
Definition: GangsterDemoArsonist.h:40
Definition: GangsterBaseLogic.h:331
Data type for encapsulating time information. It might represents points in time and time spans...
Definition: Time.h:32