Emergency 20 Dokumentation  4.2.0
MultiplayerDummyEvent.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 #include <qsf/base/WeakPtr.h>
18 
19 
20 //[-------------------------------------------------------]
21 //[ Forward declarations ]
22 //[-------------------------------------------------------]
23 namespace em5
24 {
25  namespace multiplayer
26  {
27  struct FreeplayEventData;
28  }
29 }
30 
31 
32 //[-------------------------------------------------------]
33 //[ Namespace ]
34 //[-------------------------------------------------------]
35 namespace em5
36 {
37 
38 
39  //[-------------------------------------------------------]
40  //[ Classes ]
41  //[-------------------------------------------------------]
47  {
48 
49 
50  //[-------------------------------------------------------]
51  //[ Public definitions ]
52  //[-------------------------------------------------------]
53  public:
54  static const uint32 FREEPLAY_EVENT_ID;
55 
56 
57  //[-------------------------------------------------------]
58  //[ Public methods ]
59  //[-------------------------------------------------------]
60  public:
66 
71  virtual ~MultiplayerDummyEvent();
72 
73  void updateData(const multiplayer::FreeplayEventData& eventData);
74 
75 
76  //[-------------------------------------------------------]
77  //[ Public virtual em5::FreeplayEvent methods ]
78  //[-------------------------------------------------------]
79  public:
80  virtual bool checkEventConfiguration() override;
81  virtual void updateFreeplayEvent(const qsf::Time& timePassed) override;
82  virtual const qsf::Entity* getFocusEntity() override;
83 
84  // TODO(co) Can this be removed?
85  /*virtual bool onStartup() override;
86  virtual void onShutdown() override;
87  virtual void onRun() override;
88  virtual bool onFailure(EventResult& eventResult) override;
89  virtual void updateFreeplayEvent(const qsf::Time& timePassed) override;
90  virtual bool addEntityToEvent(qsf::Entity& targetEntity, eventspreadreason::Reason eventSpreadReason, bool newReason) override;
91  virtual void hintCallback(Observer& hintObserver) override;
92  virtual void serialize(qsf::BinarySerializer& serializer) override;*/
93 
94 
95  //[-------------------------------------------------------]
96  //[ Private data ]
97  //[-------------------------------------------------------]
98  private:
99  qsf::WeakPtr<qsf::Entity> mFocusEntity;
100 
101 
102  //[-------------------------------------------------------]
103  //[ CAMP reflection system ]
104  //[-------------------------------------------------------]
105  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
106 
107 
108  };
109 
110 
111 //[-------------------------------------------------------]
112 //[ Namespace ]
113 //[-------------------------------------------------------]
114 } // em5
115 
116 
117 //[-------------------------------------------------------]
118 //[ CAMP reflection system ]
119 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Entity class.
Definition: Entity.h:46
unsigned int uint32
Definition: PlatformTypes.h:181
#define EM5_API_EXPORT
Definition: Export.h:28
static const uint32 FREEPLAY_EVENT_ID
"em5::MultiplayerDummyEvent" unique freeplay event ID
Definition: MultiplayerDummyEvent.h:54
Definition: OperationMessages.h:307
EMERGENCY 5 dummy event for multiplayer (used on client side)
Definition: MultiplayerDummyEvent.h:46
#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
Abstract EMERGENCY 5 freeplay event base class.
Definition: FreeplayEvent.h:66
Data type for encapsulating time information. It might represents points in time and time spans...
Definition: Time.h:32