Emergency 20 Dokumentation  4.2.0
VehicleFireEvent.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 
17 
18 
19 //[-------------------------------------------------------]
20 //[ Namespace ]
21 //[-------------------------------------------------------]
22 namespace em5
23 {
24 
25 
26  //[-------------------------------------------------------]
27  //[ Classes ]
28  //[-------------------------------------------------------]
34  {
35 
36 
37  //[-------------------------------------------------------]
38  //[ Public definitions ]
39  //[-------------------------------------------------------]
40  public:
41  static const uint32 FREEPLAY_EVENT_ID;
42 
43 
44  //[-------------------------------------------------------]
45  //[ Public methods ]
46  //[-------------------------------------------------------]
47  public:
53 
58  virtual ~VehicleFireEvent();
59 
64  uint64 getTargetEntityId() const;
65 
70  void setTargetEntity(const qsf::Entity& entity);
71 
76  uint32 getDeadPersonsToFail() const;
77 
82  void setDeadPersonsToFail(uint32 personsToFail);
83 
84  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(PersonsDamage, bool, mPersonsDamage)
85 
86 
87  //[-------------------------------------------------------]
88  //[ Public virtual em5::FreeplayEvent methods ]
89  //[-------------------------------------------------------]
90  public:
91  virtual bool onStartup() override;
92  virtual void onShutdown() override;
93  virtual void onRun() override;
94  virtual void updateFreeplayEvent(const qsf::Time& timePassed) override;
95  virtual bool addEntityToEvent(qsf::Entity& targetEntity, eventspreadreason::Reason eventSpreadReason, bool newReason) override;
96  virtual const qsf::Entity* getFocusEntity() override;
97  virtual bool checkEventConfiguration() override;
98  virtual void serialize(qsf::BinarySerializer& serializer) override;
99  virtual void hintCallback(Observer& hintObserver) override;
100 
101 
102  //[-------------------------------------------------------]
103  //[ Private methods ]
104  //[-------------------------------------------------------]
105  private:
106  void startObjectives(const qsf::Entity& targetEntity);
107  void startHintObservers(const qsf::Entity& targetEntity);
108 
113  void onSignal(const qsf::MessageParameters& parameters);
114 
119  void stopTheCar(qsf::Entity& targetEntity);
120 
121 
122  //[-------------------------------------------------------]
123  //[ Private data ]
124  //[-------------------------------------------------------]
125  private:
126  uint64 mTargetEntityId;
127  uint32 mDeadPersonsToFail;
128  bool mPersonsDamage;
129  qsf::MessageConfiguration mMessage;
130  qsf::MessageProxy mMessageProxy;
131 
132 
133  //[-------------------------------------------------------]
134  //[ CAMP reflection system ]
135  //[-------------------------------------------------------]
136  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
137 
138 
139  };
140 
141 
142 //[-------------------------------------------------------]
143 //[ Namespace ]
144 //[-------------------------------------------------------]
145 } // em5
146 
147 
148 //[-------------------------------------------------------]
149 //[ CAMP reflection system ]
150 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
EMERGENCY 5 observer base class.
Definition: Observer.h:41
static const uint32 FREEPLAY_EVENT_ID
"em5::VehicleFireEvent" unique freeplay event ID
Definition: VehicleFireEvent.h:41
Entity class.
Definition: Entity.h:46
unsigned int uint32
Definition: PlatformTypes.h:181
#define EM5_API_EXPORT
Definition: Export.h:28
Reason
Definition: EventSpreadReason.h:20
uint64_t uint64
Definition: PlatformTypes.h:184
void serialize(BinarySerializer &serializer, BitFlagSet< STORAGE, ENUM > &bitFlagSet)
Definition: BitFlagSet.h:359
Definition: PickupPersonByParamedicAction.h:21
#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 freeplay event "vehicle fire".
Definition: VehicleFireEvent.h:33
Abstract EMERGENCY 5 freeplay event base class.
Definition: FreeplayEvent.h:66