Emergency 20 Dokumentation  4.2.0
JailbreakEvent.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2014 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 FREEPLAY_EVENT_ID;
41 
42 
43  //[-------------------------------------------------------]
44  //[ Public methods ]
45  //[-------------------------------------------------------]
46  public:
52 
57  virtual ~JailbreakEvent();
58 
59  std::vector<uint64>& getPrisonerIds();
60 
61  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(ArmedChance, float, mArmedChance);
62 
63 
64  //[-------------------------------------------------------]
65  //[ Public virtual em5::FreeplayEvent methods ]
66  //[-------------------------------------------------------]
67  public:
68  virtual bool onStartup() override;
69  virtual void onShutdown() override;
70  virtual void onRun() override;
71  virtual bool onFailure(EventResult& eventResult) override;
72  virtual void updateFreeplayEvent(const qsf::Time& timePassed) override;
73  virtual void hintCallback(Observer& hintObserver) override;
74  virtual const qsf::Entity* getFocusEntity() override;
75  virtual bool checkEventConfiguration() override;
76  virtual void serialize(qsf::BinarySerializer& serializer) override;
77  virtual bool addEntityToEvent(qsf::Entity& targetEntity, eventspreadreason::Reason eventSpreadReason, bool newReason) override;
78 
79 
80  //[-------------------------------------------------------]
81  //[ Private methods ]
82  //[-------------------------------------------------------]
83  private:
84  void startHintObservers();
85  void onGameTimerMessage(const qsf::MessageParameters& parameters);
86 
87  void setupGangster(qsf::Entity& gangsterEntity);
88 
89  void onPrisonerFound(const qsf::MessageParameters& parameters);
90 
91 
92  //[-------------------------------------------------------]
93  //[ Private data ]
94  //[-------------------------------------------------------]
95  private:
96  // Configuration
97  float mArmedChance;
98 
99  // Internal
100  std::vector<uint64> mPrisonerIds;
101  qsf::Time mPrisonersSeekTime;
102  bool mAllGangsterDetectByDrone;
103 
104  std::vector<qsf::MessageProxy> mPrisonerFoundMessageProxies;
105  qsf::MessageProxy mGameTimerMessageProxy;
106 
107  qsf::Time mHint01WaitTime;
108 
109 
110  //[-------------------------------------------------------]
111  //[ CAMP reflection system ]
112  //[-------------------------------------------------------]
113  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
114 
115 
116  };
117 
118 
119 //[-------------------------------------------------------]
120 //[ Namespace ]
121 //[-------------------------------------------------------]
122 } // em5
123 
124 
125 //[-------------------------------------------------------]
126 //[ CAMP reflection system ]
127 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
EMERGENCY 5 observer base class.
Definition: Observer.h:41
Definition: FreeplayEvent.h:110
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
Reason
Definition: EventSpreadReason.h:20
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
#define QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(name, type, variable)
Definition: PropertyHelper.h:16
EMERGENCY 5 gangster freeplay event base class.
Definition: GangsterEvent.h:41
Binary serializer class.
Definition: BinarySerializer.h:35
static const uint32 FREEPLAY_EVENT_ID
"em5::JailbreakEvent" unique freeplay event ID
Definition: JailbreakEvent.h:40
EMERGENCY 5 freeplay event class for "jailbreak".
Definition: JailbreakEvent.h:32
Data type for encapsulating time information. It might represents points in time and time spans...
Definition: Time.h:32