Emergency 20 Dokumentation  4.2.0
SpawnEntities.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 //[-------------------------------------------------------]
13 #include <qsf/job/JobProxy.h>
15 
16 #include <boost/noncopyable.hpp>
17 
18 
19 //[-------------------------------------------------------]
20 //[ Forward declarations ]
21 //[-------------------------------------------------------]
22 namespace qsf
23 {
24  namespace game
25  {
26  class WeatherState;
27  }
28 }
29 
30 
31 //[-------------------------------------------------------]
32 //[ Namespace ]
33 //[-------------------------------------------------------]
34 namespace em5
35 {
36 
37 
38  //[-------------------------------------------------------]
39  //[ Classes ]
40  //[-------------------------------------------------------]
48  class SpawnEntities : public boost::noncopyable
49  {
50 
51 
52  //[-------------------------------------------------------]
53  //[ Public methods ]
54  //[-------------------------------------------------------]
55  public:
60  SpawnEntities(uint32 jobManagerId);
61 
66  virtual ~SpawnEntities();
67 
72  void setDebug(bool debug);
73 
74 
75  //[-------------------------------------------------------]
76  //[ Public virtual em5::SpawnEntities methods ]
77  //[-------------------------------------------------------]
78  public:
79  virtual void createStartupPopulation();
80 
81 
82  //[-------------------------------------------------------]
83  //[ Protected virtual em5::SpawnEntities methods ]
84  //[-------------------------------------------------------]
85  protected:
86  virtual uint32 getCurrentEntities() { return 0; }
87  virtual uint32 getMaximumEntities() { return 0; }
88  virtual void updateSpawning() {}
89 
90 
91  //[-------------------------------------------------------]
92  //[ Protected methods ]
93  //[-------------------------------------------------------]
94  protected:
95  float getCurrentHourOfDay() const;
97 
98  void getStartupPopulationPoints(uint32 count, uint32 worldIndex, uint32 laneTypeId, std::vector<qsf::Transform>& outPoints);
99 
100 
101  //[-------------------------------------------------------]
102  //[ Private methods ]
103  //[-------------------------------------------------------]
104  private:
105  void updateSpawnPoints();
106 
107 
108  //[-------------------------------------------------------]
109  //[ Protected data ]
110  //[-------------------------------------------------------]
111  protected:
115 
116 
117  };
118 
119 
120 //[-------------------------------------------------------]
121 //[ Namespace ]
122 //[-------------------------------------------------------]
123 } // em5
Definition: ActionPriority.h:13
Job proxy class.
Definition: JobProxy.h:51
unsigned int uint32
Definition: PlatformTypes.h:181
SpawnEntities(uint32 jobManagerId)
Constructor.
void getStartupPopulationPoints(uint32 count, uint32 worldIndex, uint32 laneTypeId, std::vector< qsf::Transform > &outPoints)
virtual void createStartupPopulation()
const qsf::game::WeatherState * getCurrentWeatherState() const
bool mDebugEnabled
Definition: SpawnEntities.h:114
qsf::JobProxy mSpawnJobProxy
Regular simulation job proxy.
Definition: SpawnEntities.h:112
Base class for spawn controllers.
Definition: SpawnEntities.h:48
virtual uint32 getCurrentEntities()
Definition: SpawnEntities.h:86
virtual void updateSpawning()
Definition: SpawnEntities.h:88
Definition: PickupPersonByParamedicAction.h:21
Debug draw proxy class.
Definition: DebugDrawProxy.h:46
virtual ~SpawnEntities()
Destructor.
void setDebug(bool debug)
Enable/disable debug output.
qsf::DebugDrawProxy mDebugDrawProxy
Debug draw proxy.
Definition: SpawnEntities.h:113
float getCurrentHourOfDay() const
virtual uint32 getMaximumEntities()
Definition: SpawnEntities.h:87
Weather state class.
Definition: WeatherState.h:40