Emergency 20 Dokumentation  4.2.0
ChallengeGameMode.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 #include "em5/map/MapIdentifier.h"
15 
16 
17 //[-------------------------------------------------------]
18 //[ Namespace ]
19 //[-------------------------------------------------------]
20 namespace em5
21 {
22 
23 
24  //[-------------------------------------------------------]
25  //[ Classes ]
26  //[-------------------------------------------------------]
32  {
33 
34 
35  //[-------------------------------------------------------]
36  //[ Public methods ]
37  //[-------------------------------------------------------]
38  public:
44 
50 
51 
52  //[-------------------------------------------------------]
53  //[ Public virtual em5::GameMode methods ]
54  //[-------------------------------------------------------]
55  public:
56  virtual std::string getGameModeAsString() const override;
57  virtual void startup() override;
58  virtual void shutdown() override;
59  virtual void updateGameMode(qsf::Time timePassed) override;
60 
61 
62  //[-------------------------------------------------------]
63  //[ Protected virtual em5::FreeplayGameMode methods ]
64  //[-------------------------------------------------------]
65  protected:
66  virtual void onEventSucceeded(const qsf::MessageParameters& parameters) override;
67  virtual void onEventFailed(const qsf::MessageParameters& parameters) override;
68  virtual void onFirstEventCompleted() override;
69 
70 
71  //[-------------------------------------------------------]
72  //[ Private methods ]
73  //[-------------------------------------------------------]
74  private:
75  void onEventFinished(const qsf::MessageParameters& parameters);
76 
77 
78  //[-------------------------------------------------------]
79  //[ Private data ]
80  //[-------------------------------------------------------]
81  private:
82  float mEventDensityAbortDifference;
83  bool mFailed;
84  uint32 mFailedEvents;
85  uint32 mSuccessEvents;
86 
87 
88  //[-------------------------------------------------------]
89  //[ CAMP reflection system ]
90  //[-------------------------------------------------------]
91  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
92 
93 
94  };
95 
96 
97 //[-------------------------------------------------------]
98 //[ Namespace ]
99 //[-------------------------------------------------------]
100 } // em5
101 
102 
103 //[-------------------------------------------------------]
104 //[ CAMP reflection system ]
105 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
virtual std::string getGameModeAsString() const override
Return the game mode type as string (lowercase)
Message parameters class.
Definition: MessageParameters.h:34
virtual void onEventSucceeded(const qsf::MessageParameters &parameters) override
unsigned int uint32
Definition: PlatformTypes.h:181
virtual void startup() override
virtual void updateGameMode(qsf::Time timePassed) override
ChallengeGameMode()
Default constructor.
#define QSF_CAMP_RTTI()
Only adds the virtual method "campClassId()", nothing more.
Definition: CampClass.h:75
EMERGENCY 5 challenge game mode.
Definition: ChallengeGameMode.h:31
virtual void onFirstEventCompleted() override
#define QSF_CAMP_TYPE_NONCOPYABLE(type)
See "CAMP_TYPE_NONCOPYABLE" for details.
Definition: CampClass.h:112
virtual void onEventFailed(const qsf::MessageParameters &parameters) override
virtual void shutdown() override
~ChallengeGameMode()
Destructor.
EMERGENCY 5 freeplay game mode.
Definition: FreeplayGameMode.h:48
Data type for encapsulating time information. It might represents points in time and time spans...
Definition: Time.h:32