Emergency 20 Dokumentation  4.2.0
em5::MultiplayPvPGameMode Class Reference

EMERGENCY 5 multiplay PVP game mode. More...

#include <MultiplayPvPGameMode.h>

Inheritance diagram for em5::MultiplayPvPGameMode:
em5::FreeplayGameMode em5::GameMode qsf::Object

Public Member Functions

 MultiplayPvPGameMode ()
 Default constructor. More...
 
virtual ~MultiplayPvPGameMode ()
 Destructor. More...
 
virtual std::string getGameModeAsString () const override
 Return the game mode type as string (lowercase) More...
 
virtual void startup () override
 
virtual void updateGameMode (qsf::Time timePassed) override
 
virtual void onGameLoaded () override
 
virtual bool isSingleInteraction () const override
 
- Public Member Functions inherited from em5::FreeplayGameMode
 FreeplayGameMode ()
 Default constructor. More...
 
virtual ~FreeplayGameMode ()
 Destructor. More...
 
void toggleWorldEventPhase ()
 Starts or stops the world event. This is used for debug. More...
 
void toggleSeasonalEvent (const std::string &seasonalEventIdentifier, bool show)
 Starts or stops the seasonal event. This activates and deactivate event specific layers. More...
 
virtual void shutdown () override
 
virtual void onSendGameModeSignal (const std::string &gameModeSignal) override
 
- Public Member Functions inherited from em5::GameMode
virtual ~GameMode ()
 Destructor. More...
 
- Public Member Functions inherited from qsf::Object
virtual ~Object ()
 Destructor. More...
 
const camp::Class & getCampClass () const
 Return the CAMP class. More...
 
int getPropertyIndexById (const StringHash &propertyId) const
 Return the CAMP property index by using the unique class property ID. More...
 
uint32 getPropertyIdByIndex (int index) const
 Return the unique class property ID with the given index. More...
 
std::string getPropertyNameById (const StringHash &propertyId) const
 Return the CAMP property name by using the unique class property ID. More...
 
const camp::Property * getCampPropertyById (const StringHash &propertyId) const
 Return the CAMP property by using the unique class property ID. More...
 
void setPropertyValuesByString (const std::string &values)
 Set CAMP reflection property values by using a given string. More...
 
void setPropertiesToDefaultValues ()
 Set all CAMP reflection system properties to their default values. More...
 
void serializeToBoostPTree (boost::property_tree::ptree &pTree, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL) const
 
void serializeToBoostPTree (boost::property_tree::ptree &pTree, const camp::Class &campClass, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL) const
 
bool deserializeFromBoostPTree (const boost::property_tree::ptree &pTree, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL)
 
bool deserializeFromBoostPTree (const boost::property_tree::ptree &pTree, const camp::Class &campClass, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL)
 
void serializeToBinarySerializer (BinarySerializer &serializer, SerializationMode mode=MODE_MINIMAL, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL) const
 
void deserializeFromBinarySerializer (BinarySerializer &serializer, SerializationMode mode=MODE_MINIMAL, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL, bool setOverrideState=true)
 
virtual camp::Value getPropertyDefaultValue (const StringHash &propertyId) const
 
virtual PropertyOverrideState getPropertyOverrideState (const StringHash &propertyId) const
 
virtual bool setPropertyOverrideState (const StringHash &propertyId, PropertyOverrideState overrideState)
 
virtual void onPreDeserialize ()
 Called right before the object is deserialized using any of the above methods. Default implementation is empty. More...
 
virtual void onPostDeserialize ()
 Called right after the object was deserialized using any of the above methods. Default implementation is empty. More...
 
virtual ScriptgetAssociatedScript () const
 Return the script instance associated with this object instance. More...
 

Public Attributes

boost::signals2::signal< void(uint32, const std::string &)> newEventArrived
 Called when a new event has arrived for selection. More...
 

Protected Member Functions

virtual void onEventSucceeded (const qsf::MessageParameters &parameters) override
 
virtual void onEventFailed (const qsf::MessageParameters &parameters) override
 
virtual void onReceiveObjectivePoints (const qsf::MessageParameters &parameters) override
 
virtual void onSetPointGain (const FreeplayEvent::EventResult &eventResult, int32 pointGain) override
 
virtual void onFirstEventCompleted () override
 
void onEventFinished (const FreeplayEvent::EventResult &eventResult, bool success)
 
void onEventTriggered (const qsf::MessageParameters &parameters)
 
void assignEventToPlayer (FreeplayEvent &freeplayEvent, uint32 playerIndex)
 
bool anyEventSlotFree () const
 
- Protected Member Functions inherited from em5::FreeplayGameMode
virtual void onEventCompleted (const qsf::MessageParameters &parameters)
 
virtual std::string getIntroVideo (uint32 index)
 
bool setupEventPool (const std::string &postfix="", bool allowFallback=true)
 
bool setupFixedEventPool ()
 
void setupUnitPool (const Player *player=nullptr)
 
void setupMessageHandler ()
 
void updateEventGenerator (const qsf::Time &timePassed)
 
void setupWorldEvents (const qsf::Map &map, bool showHint)
 
void cleanupWorldEvents (const qsf::Map &map)
 
void setupFreeplay ()
 
bool startIntroVideo (uint32 index)
 
void resetEventLimit ()
 Resets the event limit to the limit specified by the spec. More...
 
- Protected Member Functions inherited from em5::GameMode
 GameMode ()
 Default constructor. More...
 
- Protected Member Functions inherited from qsf::Object
 Object ()
 Default constructor. More...
 

Protected Attributes

qsf::Time mRemainingTime
 
bool mEndlessMode
 
multiplayer::server::HostmMultiplayerHost
 
std::unordered_map< uint32, std::unordered_set< uint32 > > mPerPlayerActiveEventCount
 
std::vector< uint32mPlayerListToChooseFrom
 
uint16 mMaxEventsPerPlayer
 
qsf::MessageProxy mEventTriggeredMessageProxy
 Message proxy for the "freeplay event triggered" message. More...
 
- Protected Attributes inherited from em5::FreeplayGameMode
MapIdentifier mMapIdentifier
 The current map. More...
 
bool mIsPlayingIntro
 
bool mFirstEventCompleted
 
qsf::MessageProxy mCutsceneMessageProxy
 

Additional Inherited Members

- Public Types inherited from qsf::Object
enum  PropertyOverrideState { PROPERTY_INVALID, PROPERTY_DEFAULT, PROPERTY_OVERRIDE, PROPERTY_REMOVED }
 
enum  SerializationMethod { SERIALIZE_FLAT, SERIALIZE_COMPLETE, SERIALIZE_DIFFERENTIAL, SERIALIZE_IGNORE_UNKNOWN }
 
enum  SerializationMode { MODE_MINIMAL, MODE_COMPATIBLE }
 

Detailed Description

EMERGENCY 5 multiplay PVP game mode.

Constructor & Destructor Documentation

em5::MultiplayPvPGameMode::MultiplayPvPGameMode ( )

Default constructor.

virtual em5::MultiplayPvPGameMode::~MultiplayPvPGameMode ( )
virtual

Destructor.

Member Function Documentation

bool em5::MultiplayPvPGameMode::anyEventSlotFree ( ) const
protected
void em5::MultiplayPvPGameMode::assignEventToPlayer ( FreeplayEvent freeplayEvent,
uint32  playerIndex 
)
protected
virtual std::string em5::MultiplayPvPGameMode::getGameModeAsString ( ) const
overridevirtual

Return the game mode type as string (lowercase)

Reimplemented from em5::FreeplayGameMode.

virtual bool em5::MultiplayPvPGameMode::isSingleInteraction ( ) const
overridevirtual

Reimplemented from em5::GameMode.

virtual void em5::MultiplayPvPGameMode::onEventFailed ( const qsf::MessageParameters parameters)
overrideprotectedvirtual

Reimplemented from em5::FreeplayGameMode.

void em5::MultiplayPvPGameMode::onEventFinished ( const FreeplayEvent::EventResult eventResult,
bool  success 
)
protected
virtual void em5::MultiplayPvPGameMode::onEventSucceeded ( const qsf::MessageParameters parameters)
overrideprotectedvirtual

Reimplemented from em5::FreeplayGameMode.

void em5::MultiplayPvPGameMode::onEventTriggered ( const qsf::MessageParameters parameters)
protected
virtual void em5::MultiplayPvPGameMode::onFirstEventCompleted ( )
overrideprotectedvirtual

Reimplemented from em5::FreeplayGameMode.

virtual void em5::MultiplayPvPGameMode::onGameLoaded ( )
overridevirtual

Reimplemented from em5::FreeplayGameMode.

virtual void em5::MultiplayPvPGameMode::onReceiveObjectivePoints ( const qsf::MessageParameters parameters)
overrideprotectedvirtual

Reimplemented from em5::FreeplayGameMode.

virtual void em5::MultiplayPvPGameMode::onSetPointGain ( const FreeplayEvent::EventResult eventResult,
int32  pointGain 
)
overrideprotectedvirtual

Reimplemented from em5::FreeplayGameMode.

virtual void em5::MultiplayPvPGameMode::startup ( )
overridevirtual

Reimplemented from em5::FreeplayGameMode.

virtual void em5::MultiplayPvPGameMode::updateGameMode ( qsf::Time  timePassed)
overridevirtual

Reimplemented from em5::FreeplayGameMode.

Member Data Documentation

bool em5::MultiplayPvPGameMode::mEndlessMode
protected
qsf::MessageProxy em5::MultiplayPvPGameMode::mEventTriggeredMessageProxy
protected

Message proxy for the "freeplay event triggered" message.

uint16 em5::MultiplayPvPGameMode::mMaxEventsPerPlayer
protected
multiplayer::server::Host* em5::MultiplayPvPGameMode::mMultiplayerHost
protected
std::unordered_map<uint32, std::unordered_set<uint32> > em5::MultiplayPvPGameMode::mPerPlayerActiveEventCount
protected
std::vector<uint32> em5::MultiplayPvPGameMode::mPlayerListToChooseFrom
protected
qsf::Time em5::MultiplayPvPGameMode::mRemainingTime
protected
boost::signals2::signal<void(uint32, const std::string&)> em5::MultiplayPvPGameMode::newEventArrived

Called when a new event has arrived for selection.

Note
  • Recommended slot signature: void onnewEventArrived(uint32 eventId, const std::string& eventName)

The documentation for this class was generated from the following file: