Emergency 20 Dokumentation  4.2.0
TerrorAttackEventFactory.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 #include <qsf/time/Time.h>
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 methods ]
48  //[-------------------------------------------------------]
49  public:
55 
60  virtual ~TerrorAttackEventFactory();
61 
62  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(BombTime, qsf::Time, mBombTime);
63  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(TerroristCount, int, mTerroristCount);
64 
65 
66  //[-------------------------------------------------------]
67  //[ Public virtual em5::FreeplayEventFactory methods ]
68  //[-------------------------------------------------------]
69  public:
70  virtual FreeplayEvent* tryTriggerEvent() override;
71 
72 
73  //[-------------------------------------------------------]
74  //[ Private methods ]
75  //[-------------------------------------------------------]
76  private:
77  bool checkBombSpot(qsf::Entity& victim) const;
78  void findCandidates(int count, std::vector<std::pair<qsf::Entity*, qsf::Entity*>>& candidates) const;
79 
80 
81  //[-------------------------------------------------------]
82  //[ Private data ]
83  //[-------------------------------------------------------]
84  private:
85  qsf::Time mBombTime;
86  int mTerroristCount;
87 
88 
89  //[-------------------------------------------------------]
90  //[ CAMP reflection system ]
91  //[-------------------------------------------------------]
92  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
93 
94 
95  };
96 
97 
98 //[-------------------------------------------------------]
99 //[ Namespace ]
100 //[-------------------------------------------------------]
101 } // em5
102 
103 
104 //[-------------------------------------------------------]
105 //[ CAMP reflection system ]
106 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Entity class.
Definition: Entity.h:46
#define EM5_API_EXPORT
Definition: Export.h:28
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
EMERGENCY 5 freeplay event factory base class.
Definition: FreeplayEventFactory.h:56
#define QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(name, type, variable)
Definition: PropertyHelper.h:16
Abstract EMERGENCY 5 freeplay event base class.
Definition: FreeplayEvent.h:66
Emergency 5 freeplay event factory for "terror attack".
Definition: TerrorAttackEventFactory.h:42
Data type for encapsulating time information. It might represents points in time and time spans...
Definition: Time.h:32