Emergency 20 Dokumentation  4.2.0
GameMode.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/time/Time.h>
15 
16 
17 //[-------------------------------------------------------]
18 //[ Namespace ]
19 //[-------------------------------------------------------]
20 namespace em5
21 {
22 
23 
24  //[-------------------------------------------------------]
25  //[ Classes ]
26  //[-------------------------------------------------------]
31  class GameMode : public qsf::Object
32  {
33 
34 
35  //[-------------------------------------------------------]
36  //[ Public methods ]
37  //[-------------------------------------------------------]
38  public:
43  virtual ~GameMode();
44 
45 
46  //[-------------------------------------------------------]
47  //[ Public virtual em5::GameMode methods ]
48  //[-------------------------------------------------------]
49  public:
54  virtual std::string getGameModeAsString() const = 0;
55 
56  virtual void startup() = 0;
57  virtual void shutdown() = 0;
58  virtual void onGameLoaded();
59  virtual bool isSingleInteraction() const; // "true" means that only one player can interact with the event object
60  virtual void updateGameMode(qsf::Time timePassed) = 0;
61  virtual void onSendGameModeSignal(const std::string& gameModeSignal);
62 
63 
64  //[-------------------------------------------------------]
65  //[ Protected methods ]
66  //[-------------------------------------------------------]
67  protected:
72  GameMode();
73 
74 
75  //[-------------------------------------------------------]
76  //[ CAMP reflection system ]
77  //[-------------------------------------------------------]
78  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
79 
80 
81  };
82 
83 
84 //[-------------------------------------------------------]
85 //[ Namespace ]
86 //[-------------------------------------------------------]
87 } // em5
88 
89 
90 //[-------------------------------------------------------]
91 //[ CAMP reflection system ]
92 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Object base class.
Definition: Object.h:68
virtual void onSendGameModeSignal(const std::string &gameModeSignal)
virtual bool isSingleInteraction() const
virtual ~GameMode()
Destructor.
virtual void updateGameMode(qsf::Time timePassed)=0
#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
virtual void startup()=0
virtual void onGameLoaded()
virtual void shutdown()=0
virtual std::string getGameModeAsString() const =0
Return the game mode type as string (lowercase)
GameMode()
Default constructor.
EMERGENCY 5 game mode base class.
Definition: GameMode.h:31
Data type for encapsulating time information. It might represents points in time and time spans...
Definition: Time.h:32