Emergency 20 Dokumentation  4.2.0
BuildingNearlyCollapseEventFactory.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 //[ Forward declarations ]
20 //[-------------------------------------------------------]
21 namespace em5
22 {
23  class BuildingComponent;
24 }
25 namespace qsf
26 {
27  class Entity;
28 }
29 
30 
31 //[-------------------------------------------------------]
32 //[ Namespace ]
33 //[-------------------------------------------------------]
34 namespace em5
35 {
36 
37 
38  //[-------------------------------------------------------]
39  //[ Classes ]
40  //[-------------------------------------------------------]
46  {
47 
48 
49  //[-------------------------------------------------------]
50  //[ Public methods ]
51  //[-------------------------------------------------------]
52  public:
58 
64 
65  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(ShowTutorialHints, bool, mShowTutorialHints)
66  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(UseAmbientLayer, bool, mUseAmbientLayer)
67 
68 
69  //[-------------------------------------------------------]
70  //[ Public virtual em5::FreeplayEventFactory methods ]
71  //[-------------------------------------------------------]
72  public:
73  virtual FreeplayEvent* tryTriggerEvent() override;
74 
75 
76  //[-------------------------------------------------------]
77  //[ Private methods ]
78  //[-------------------------------------------------------]
79  private:
80  qsf::Entity* findCandidate();
81  bool checkHouseCandidate(em5::BuildingComponent& buildingComponent) const;
82 
83 
84  //[-------------------------------------------------------]
85  //[ Private data ]
86  //[-------------------------------------------------------]
87  private:
88  bool mShowTutorialHints;
89  bool mUseAmbientLayer;
90 
91  // Internal
92  std::string mLayerName;
93 
94 
95  //[-------------------------------------------------------]
96  //[ CAMP reflection system ]
97  //[-------------------------------------------------------]
98  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
99 
100 
101  };
102 
103 
104 //[-------------------------------------------------------]
105 //[ Namespace ]
106 //[-------------------------------------------------------]
107 } // em5
108 
109 
110 //[-------------------------------------------------------]
111 //[ CAMP reflection system ]
112 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
EMERGENCY 5 building component class.
Definition: BuildingComponent.h:56
Entity class.
Definition: Entity.h:46
#define EM5_API_EXPORT
Definition: Export.h:28
Definition: PickupPersonByParamedicAction.h:21
EMERGENCY 5 freeplay event factory for "building nearly collapse".
Definition: BuildingNearlyCollapseEventFactory.h:45
#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