Emergency 20 Dokumentation  4.2.0
em5::MainEvent Class Referenceabstract

EMERGENCY 5 main event base class. More...

#include <MainEvent.h>

Inheritance diagram for em5::MainEvent:
em5::FreeplayEvent qsf::Object qsf::WeakPtrTarget em5::Em20MainEventBase em5::MainEvent01 em5::MainEvent02 em5::MainEvent04 em5::MainEvent05 em5::MainEvent06 em5::MainEvent07 em5::MainEvent08 em5::MainEvent10 em5::MainEvent100 em5::MainEvent101 em5::MainEvent102 em5::MainEvent103 em5::MainEvent104 em5::MainEvent12 em5::MainEvent14 em5::MainEvent15 em5::MainEvent200 em5::MainEvent201 em5::MainEvent202 em5::MainEvent203 em5::MainEvent204

Public Member Functions

 MainEvent (const std::string &eraseLayerName, const std::string &settingLayerName, const std::string &eventLayerName, const std::string &introCutsceneLayerName, const std::string &sceneTag, const std::string &introSequence, const std::string &prologueSequence)
 Constructor. More...
 
virtual ~MainEvent ()
 Destructor. More...
 
void onFinishScreenClosed ()
 Gets called when either the win or loose screen has been closed. More...
 
virtual bool onStartup () override
 React to startup of the freeplay event. More...
 
virtual void onShutdown () override
 React to shutdown of the freeplay event. More...
 
virtual bool onSuccess (EventResult &eventResult) override
 React to state change from running state to success state. More...
 
virtual bool onFailure (EventResult &eventResult) override
 React to state change from running state to failed state. More...
 
virtual uint32 calculatePointGain (EventResult &eventResult) override
 Calculate the point gain for this event. More...
 
virtual void updateFreeplayEvent (const qsf::Time &timePassed) override
 Regular update call, gets called once a game tick. More...
 
virtual bool checkEventConfiguration () override
 Returns "true" if the event has the right configuration and can trigger right now. More...
 
virtual void serialize (qsf::BinarySerializer &serializer) override
 Serialization using a binary serializer. More...
 
- Public Member Functions inherited from em5::FreeplayEvent
 FreeplayEvent ()
 Default constructor. More...
 
virtual ~FreeplayEvent ()
 Destructor. More...
 
uint32 getId () const
 Return freeplay event ID. More...
 
const std::string & getEventName () const
 Return freeplay event's localizable name (e.g. "EM5_EVENT_TITLE_04") More...
 
void setEventName (const std::string &name)
 Set freeplay event's localizable name (e.g. "EM5_EVENT_TITLE_04") More...
 
const qsf::NamedIdentifiergetEventFactoryName () const
 Return original freeplay event factory's name. More...
 
void setEventFactoryName (const qsf::NamedIdentifier &factoryName)
 Set original freeplay event factory's name. More...
 
const EntityIdArraygetEntityIds () const
 Get event entities. More...
 
qsf::EntitygetRandomEventEntity () const
 Get a random event entity. More...
 
qsf::EntitygetRandomVisibleEventEntity () const
 
const ObjectiveListgetObjectiveList () const
 Return the objectives list. More...
 
const ObjectiveListgetObjectivesOrResultObjectives () const
 
qsf::MapgetMap ()
 Returns the map this event takes place in, all entities of the event are inside this map. More...
 
const qsf::MapgetMap () const
 
int getObjectivePointByText (const std::string &objectiveText) const
 Return the points the player get if he close this objective. More...
 
int getObjectivePoints () const
 Return the points for all objectives. More...
 
const RecordedHintSystemMessagesgetRecordedHintSystemMessages () const
 Return recorded hint system messages. More...
 
bool startup ()
 Startup the freeplay event. More...
 
void shutdown ()
 Shutdown the freeplay event. More...
 
void setRunning ()
 Set event state to "running", i.e. show the event to the user now. More...
 
void setFinished (bool successful)
 Finish the event, and set it either to succeeded or failed. More...
 
void abortEvent ()
 Abort this event. More...
 
void setCanWinEvent (bool canWinEvent)
 Set the flag which prevents winning the event even though all objectives succeeded. More...
 
bool getCanWinEvent () const
 Access the flag which prevents winning the event even though all objectives succeeded. More...
 
void setCanLoseEvent (bool canLoseEvent)
 Set the flag which prevents losing the event even though a fail condition is fulfilled. More...
 
bool getCanLoseEvent () const
 Access the flag which prevents losing the event even though a fail condition is fulfilled. More...
 
void finishObjective (Objective &objective)
 
void performUpdateFreeplayEvent (const qsf::Time &timePassed)
 Perform regular update once a game tick. More...
 
void pauseEventTime ()
 Pause progress of event time. More...
 
void resumeEventTime ()
 Resume event time after it has been paused. More...
 
qsf::Time getCurrentLifeTime () const
 Get game time passed since this event was triggered, i.e. got its startup. More...
 
qsf::Time getCurrentRunningTime () const
 Get game time passed since this event was set to running state, i.e. was showed to the player. More...
 
void setGreatJob (bool greatJob)
 Set whether or not the normal or great point gain should occur. More...
 
uint32 getNormalPointGain () const
 Get point gain on normal success. More...
 
void setNormalPointGain (uint32 pointGain)
 Set point gain on normal success. More...
 
uint32 getNormalCreditGain () const
 Get credit gain on campaign success. More...
 
void setNormalCreditGain (uint32 creditGain)
 Set credit gain on campaign success. More...
 
uint32 getMultiplayerPointGain () const
 Get point gain on multiplayer success. More...
 
void setMultiplayerPointGain (uint32 pointGain)
 Set point gain on multiplayer success. More...
 
State getState () const
 Get or set the music level of the event (high or low) More...
 
float getEventDensityIncrease () const
 Get event factor. More...
 
void setEventDensityIncrease (float eventDensityIncrease)
 Set event factor. More...
 
float getEventDensity () const
 Get the event density. More...
 
void setEventDensity (float density)
 Set event density. More...
 
bool deserializeEventFromBoostPTree (const boost::property_tree::ptree &pTree, qsf::Object::SerializationMethod serializationMethod=qsf::Object::SERIALIZE_IGNORE_UNKNOWN)
 Deserialize event properties. More...
 
uint32 getPlayerIndex () const
 Returns the player index to which the event is assigned. More...
 
void setPlayerIndex (uint32 playerIndex)
 Sets the player index to which the event is assigned. More...
 
bool isEventLocationEntitySet () const
 Return "true" if the event location entity is set, else "false". More...
 
qsf::EntitygetEventLocationEntity () const
 
bool isTimeout (const qsf::Time &timePassed)
 
virtual void onRun ()
 React to state change from (initial) hidden state to running state. More...
 
virtual bool addEntityToEvent (qsf::Entity &targetEntity, eventspreadreason::Reason eventSpreadReason, bool newReason)
 React to adding to an entity to this event, i.e. setting the event ID for the entity. More...
 
virtual void hintCallback (Observer &hintObserver)
 Handle the activation of a hint observer. More...
 
virtual void hintCallbackWithMessage (Observer &hintObserver, const qsf::MessageParameters &parameters)
 
virtual void onTimerTriggered (uint32 timerId)
 
virtual const qsf::EntitygetFocusEntity ()
 Get an event entity that is currently crucial for this event This is the entity which gets the focus when the player clicks on go to event. 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...
 

Static Public Attributes

static const std::string SEQUENCE_FADEOUT
 
- Static Public Attributes inherited from em5::FreeplayEvent
static const uint32 GAME_TIMER_MESSAGE_ID
 "em5::FreeplayEvent_GameTimerMessage" unique message ID More...
 
static const std::string MUSIC_LEVEL_LOW
 
static const std::string MUSIC_LEVEL_HIGH
 

Protected Member Functions

virtual void onStartIntroRequest ()
 React to the intro start request; do only overwrite the default implementation if you really have to. More...
 
virtual void onIntroStart (const qsf::MessageParameters &parameters)
 React to the activation of the black screen, which is the start of the intro cutscene. More...
 
virtual void onIntroFinished (const qsf::MessageParameters &parameters)
 React to the end of the intro; note that the prologue cutscene is played next. More...
 
virtual void onPrologueFinished (const qsf::MessageParameters &parameters)
 React to the end of the prologue. More...
 
virtual void onUpdateMainEvent (const qsf::Time &timePassed)
 Gets called when the main event gets an update call We use here a separate update method, which the main events should be implement to support the feature "Show entity which caused the failure". This feature needs that the base class gets update calls from the freeplay system. More...
 
virtual void onUpdateMusic (const qsf::Time &timePassed)
 Gets called when the main event gets an update call We use here a separate update method, which the main events should be implement to support triggering of specific music tracks. More...
 
virtual uint32 getEventNumber ()=0
 Gets number of the main event (Is needed for the highscore management) More...
 
virtual std::string getCamStartEventTag ()
 Return event tag of a start camera for the event; only necessary for main events without prologue cutscene. More...
 
virtual void showBriefingSupervisorMessage ()
 Shows the briefing supervisor message for the event. More...
 
virtual void showSupervisorMessageForFinalEvaluation (uint32 pointGain)
 Shows a supervisor message when the event ends. More...
 
void activateLayer (const std::string &activate, bool showError=true)
 Activate a layer. More...
 
void deactivateLayer (const std::string &deactivate, bool showError=true, bool saveEntities=false)
 Deactivate a layer. More...
 
const std::string & getEventLayerName () const
 Get the event layer name. More...
 
const std::string & getEraseLayerName () const
 Get the erase layer name. More...
 
const std::string & getCutsceneLayerName () const
 Get the cut scene layer name. More...
 
void setPlayerControl (bool playerControl) const
 Set player control active / inactive. More...
 
void setGameSimulation (bool gameSimulation) const
 Set damage, fire and health simulation active / inactive. More...
 
void setCivilistSpawn (bool spawnEnabled) const
 Set civil cars and persons spawning active / inactive. More...
 
void setAiSimulation (bool aiSimulation) const
 Set AI simulation. More...
 
qsf::EntitygetScene () const
 Get the scene tag entity. More...
 
void setStartDayTimeAndWeather ()
 Set the current day time and weather of the event. More...
 
uint32 addObjectiveValue (const qsf::StringHash &objectiveId, EventResult &eventResult, uint32 pointValue) const
 Add objective text / point value pair to event result. More...
 
uint32 addObjectiveValue (const Objective *objective, EventResult &eventResult, uint32 pointValue) const
 Add objective text / point value pair to event result. More...
 
uint32 getEfficiencyPointValue () const
 Get the efficiency point gain. More...
 
void startIntro (bool forceNoFadeOut=false)
 Start the intro. More...
 
CutscenePlayergetCutscenePlayer () const
 Get the current cutscene player. More...
 
void flyCameraTo (qsf::Entity &targetCameraEntity, float maximumAcceleration=100.0f, float maximumSpeed=25.0f)
 Is moving the camera to the target entity to highlight a specific event, like a very small in-game cutscene. More...
 
void setMainEventFinished (bool successful, bool showFailedReason=true)
 Extended version of the setFinished. This method supports showing the entity which caused the failure of the event. More...
 
bool isNumberOfBurningObjectsBelowX (uint32 number)
 Is the number of burning objects in the event below x. More...
 
bool personsWithHealthBelowXPercent (float health)
 Is the health of all persons in the event below x. More...
 
bool isEntityGettingHeatDamage (const qsf::Entity &entity) const
 Is the specific entity getting some damage by heat or fire (not burning) More...
 
bool isObjectiveAccomplished (uint32 typeId)
 Check a given Objective if it is accompplished. More...
 
void setCurrentTime (const glm::vec2 &currentTime)
 
void triggerCampaignHeroAchievement () const
 The Campaign Hero achievement hase to be triggered on success of the last event in the campign. More...
 
- Protected Member Functions inherited from em5::FreeplayEvent
ObjectiveaddObjective (uint32 objectiveId, uint32 orderPriority=100)
 Add a new objective, i.e. win condition. More...
 
ObjectiveaddFailCondition (uint32 objectiveId, uint32 neededNumber, const std::string &objectiveText)
 Add a new fail condition (which is internally an objective as well) More...
 
ObjectiveListgetObjectives ()
 Return the objectives list. More...
 
void checkObjectivesState ()
 Check the objectives states and finish the event if necessary. More...
 
uint32 getFailReasonObjectiveTypeId (const ObjectiveList &objectives)
 Get the fail condition objectives type ID, of the event that is responsible for the failure of the event. More...
 
bool wasHintShown (const std::string &hintName) const
 
void showHint (const std::string &hintName, bool notMoreThanOnce, bool textOnly=false)
 
void showSupervisorMessage (const std::string &messageId, bool audioOnly=false)
 
void markHintAsAlreadyShown (const std::string &hintName)
 
ObservercreateObserverByTypeId (uint32 typeId, uint64 entityId, const std::string &name=std::string())
 Create a new observer of the specified type ID, inside the given entity. More...
 
template<typename T >
T & createObserver (uint64 entityId, const std::string &name=std::string())
 Create a new observer of the specified type, inside the given entity. More...
 
ObservercreateGeneralObserverByTypeId (uint32 typeId, const std::string &name=std::string())
 Create a new general observer (i.e. not bound to a single entity, but observing the whole map) of the specified type ID. More...
 
template<typename T >
T & createGeneralObserver (const std::string &name=std::string())
 Create a new general observer (i.e. not bound to a single entity, but observing the whole map) of the specified type. More...
 
ObservergetObserverByTypeId (uint32 typeId, uint64 entityId)
 Find an existing observer of the specified type ID, inside the given entity. More...
 
void removeObserver (Observer &observer)
 Removes and destroys the given observer. More...
 
void informFreeplaySystemAboutBeFinished ()
 
void createEventLocationEntity (qsf::Entity &entity)
 Create the event location entity for use with getFocusEntity. More...
 
void createEventLocationEntity (const glm::vec3 &position)
 Create the event location entity for use with getFocusEntity. More...
 
qsf::DynamicMusicCompositorComponentgetDynamicMusicCompositor () const
 
bool isMiniEvent () const
 
void setFailHintsForMiniEvent (EventResult &eventResult, const std::string &failedText, const std::string &miniEventSupervisorMessage, const std::string &standardEventHint="")
 
void startTimer (uint32 timerId, qsf::Time waitTime)
 
void setTimer (uint32 timerId, qsf::Time waitTime)
 
void cancelTimer (uint32 timerId)
 
void triggerTimer (uint32 timerId)
 
bool checkDebugButton (const std::string &buttonName)
 
- Protected Member Functions inherited from qsf::Object
 Object ()
 Default constructor. More...
 
- Protected Member Functions inherited from qsf::WeakPtrTarget
 WeakPtrTarget ()
 Default constructor. More...
 
 WeakPtrTarget (const WeakPtrTarget &other)
 Copy constructor. More...
 
 WeakPtrTarget (WeakPtrTarget &&)=delete
 Delete the move constructor, as WeakPtrTarget would need a proper move constructor-implementation that ensures that its pointer gets updated in the WeakPtrBase as well. More...
 
 ~WeakPtrTarget ()
 Destructor. More...
 
void invalidateAllWeakPtr ()
 Invalidate all weak pointers to this object. More...
 
void operator= (const WeakPtrTarget &other)
 Copy operator. More...
 

Protected Attributes

uint32 mMinEfficiencyPoints
 
uint32 mMaxEfficiencyPoints
 
qsf::Time mMinEfficiencyTime
 
qsf::Time mMaxEfficiencyTime
 
uint32 mNeededPointsForGold
 
uint32 mNeededPointsForSilver
 
qsf::MessageProxy mLifeCycleMessageProxy
 Listens to messages that affect the lifecycle. More...
 

Friends

class MainEventMetaclasses
 

Additional Inherited Members

- Public Types inherited from em5::FreeplayEvent
enum  State { STATE_HIDDEN = 0, STATE_RUNNING, STATE_SUCCESS, STATE_FAILED }
 
enum  EventFlag { EventFlag::WORLD_EVENT, EventFlag::MINI_EVENT }
 
typedef qsf::EnumBitmask< uint8, EventFlagEventFlagSet
 
typedef ObjectiveList::ObjectiveInstanceMap ObjectiveInstanceMap
 
typedef std::vector< uint64EntityIdArray
 
typedef boost::container::flat_map< std::string, int > ObjectivePoints
 
typedef std::vector< RecordedHintSystemMessageRecordedHintSystemMessages
 
- 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 main event base class.

Remarks
Sub-class implementations of this class represent single main event instances.

Constructor & Destructor Documentation

em5::MainEvent::MainEvent ( const std::string &  eraseLayerName,
const std::string &  settingLayerName,
const std::string &  eventLayerName,
const std::string &  introCutsceneLayerName,
const std::string &  sceneTag,
const std::string &  introSequence,
const std::string &  prologueSequence 
)

Constructor.

virtual em5::MainEvent::~MainEvent ( )
virtual

Destructor.

Member Function Documentation

void em5::MainEvent::activateLayer ( const std::string &  activate,
bool  showError = true 
)
protected

Activate a layer.

uint32 em5::MainEvent::addObjectiveValue ( const qsf::StringHash objectiveId,
EventResult eventResult,
uint32  pointValue 
) const
protected

Add objective text / point value pair to event result.

Returns
Returns zero if the objective is not existing or accomplished
uint32 em5::MainEvent::addObjectiveValue ( const Objective objective,
EventResult eventResult,
uint32  pointValue 
) const
protected

Add objective text / point value pair to event result.

Returns
Returns zero if the objective is not existing (null pointer) or not accomplished
virtual bool em5::MainEvent::checkEventConfiguration ( )
overridevirtual

Returns "true" if the event has the right configuration and can trigger right now.

Implements em5::FreeplayEvent.

void em5::MainEvent::deactivateLayer ( const std::string &  deactivate,
bool  showError = true,
bool  saveEntities = false 
)
protected

Deactivate a layer.

void em5::MainEvent::flyCameraTo ( qsf::Entity targetCameraEntity,
float  maximumAcceleration = 100.0f,
float  maximumSpeed = 25.0f 
)
protected

Is moving the camera to the target entity to highlight a specific event, like a very small in-game cutscene.

virtual std::string em5::MainEvent::getCamStartEventTag ( )
protectedvirtual

Return event tag of a start camera for the event; only necessary for main events without prologue cutscene.

Reimplemented in em5::MainEvent104, em5::MainEvent200, em5::MainEvent204, em5::MainEvent100, em5::MainEvent201, em5::MainEvent203, em5::MainEvent202, em5::MainEvent102, em5::MainEvent103, and em5::MainEvent101.

const std::string & em5::MainEvent::getCutsceneLayerName ( ) const
inlineprotected

Get the cut scene layer name.

CutscenePlayer& em5::MainEvent::getCutscenePlayer ( ) const
protected

Get the current cutscene player.

uint32 em5::MainEvent::getEfficiencyPointValue ( ) const
protected

Get the efficiency point gain.

const std::string & em5::MainEvent::getEraseLayerName ( ) const
inlineprotected

Get the erase layer name.

const std::string & em5::MainEvent::getEventLayerName ( ) const
inlineprotected

Get the event layer name.

qsf::Entity & em5::MainEvent::getScene ( ) const
inlineprotected

Get the scene tag entity.

bool em5::MainEvent::isEntityGettingHeatDamage ( const qsf::Entity entity) const
protected

Is the specific entity getting some damage by heat or fire (not burning)

bool em5::MainEvent::isNumberOfBurningObjectsBelowX ( uint32  number)
protected

Is the number of burning objects in the event below x.

bool em5::MainEvent::isObjectiveAccomplished ( uint32  typeId)
protected

Check a given Objective if it is accompplished.

virtual bool em5::MainEvent::onFailure ( EventResult eventResult)
overridevirtual
void em5::MainEvent::onFinishScreenClosed ( )

Gets called when either the win or loose screen has been closed.

void em5::MainEvent::onIntroStart ( const qsf::MessageParameters parameters)
inlineprotectedvirtual
virtual void em5::MainEvent::onStartIntroRequest ( )
protectedvirtual

React to the intro start request; do only overwrite the default implementation if you really have to.

Reimplemented in em5::MainEvent200, and em5::MainEvent100.

virtual bool em5::MainEvent::onSuccess ( EventResult eventResult)
overridevirtual

React to state change from running state to success state.

Returns
"true" when the freeplay system should be informed immediately, otherwise false (When false then the freeplay event is responsible to call informFreeplaySystemAboutBeFinished)
Note
  • Default implementation is empty

Reimplemented from em5::FreeplayEvent.

Reimplemented in em5::MainEvent104, em5::MainEvent200, em5::MainEvent204, em5::MainEvent100, em5::MainEvent01, em5::MainEvent12, em5::MainEvent201, em5::MainEvent203, em5::MainEvent102, em5::MainEvent202, em5::MainEvent301, em5::MainEvent306, em5::MainEvent308, em5::MainEvent15, em5::MainEvent07, em5::MainEvent103, em5::MainEvent04, em5::MainEvent05, em5::MainEvent307, em5::MainEvent309, em5::MainEvent02, em5::MainEvent14, em5::MainEvent06, em5::MainEvent101, em5::MainEvent302, em5::MainEvent303, em5::MainEvent304, em5::MainEvent305, em5::MainEvent310, em5::MainEvent08, em5::MainEvent10, and em5::Em20MainEventBase.

virtual void em5::MainEvent::onUpdateMainEvent ( const qsf::Time timePassed)
protectedvirtual

Gets called when the main event gets an update call We use here a separate update method, which the main events should be implement to support the feature "Show entity which caused the failure". This feature needs that the base class gets update calls from the freeplay system.

Reimplemented in em5::MainEvent104, em5::MainEvent200, em5::MainEvent204, em5::MainEvent100, em5::MainEvent01, em5::MainEvent201, em5::MainEvent203, em5::MainEvent308, em5::MainEvent202, em5::MainEvent301, em5::MainEvent306, em5::MainEvent15, em5::MainEvent102, em5::MainEvent12, em5::MainEvent07, em5::MainEvent302, em5::MainEvent309, em5::MainEvent04, em5::MainEvent02, em5::MainEvent305, em5::MainEvent307, em5::MainEvent06, em5::MainEvent303, em5::MainEvent05, em5::MainEvent304, em5::MainEvent103, em5::MainEvent310, em5::MainEvent08, and em5::MainEvent10.

virtual void em5::MainEvent::onUpdateMusic ( const qsf::Time timePassed)
protectedvirtual

Gets called when the main event gets an update call We use here a separate update method, which the main events should be implement to support triggering of specific music tracks.

Reimplemented in em5::MainEvent200, em5::MainEvent100, em5::MainEvent01, em5::MainEvent102, em5::MainEvent15, em5::MainEvent12, em5::MainEvent07, em5::MainEvent04, em5::MainEvent02, em5::MainEvent06, em5::MainEvent05, em5::MainEvent103, em5::MainEvent14, em5::MainEvent08, and em5::MainEvent10.

bool em5::MainEvent::personsWithHealthBelowXPercent ( float  health)
protected

Is the health of all persons in the event below x.

void em5::MainEvent::setAiSimulation ( bool  aiSimulation) const
protected

Set AI simulation.

void em5::MainEvent::setCivilistSpawn ( bool  spawnEnabled) const
protected

Set civil cars and persons spawning active / inactive.

void em5::MainEvent::setCurrentTime ( const glm::vec2 &  currentTime)
protected
void em5::MainEvent::setGameSimulation ( bool  gameSimulation) const
protected

Set damage, fire and health simulation active / inactive.

void em5::MainEvent::setMainEventFinished ( bool  successful,
bool  showFailedReason = true 
)
protected

Extended version of the setFinished. This method supports showing the entity which caused the failure of the event.

Parameters
[in]successful"true" if event was successfully finished otherwise "false"
[in]showFailedReason"true" when on failed state the entity, which caused the failure should be shown otherwise "false" (e.g. when the event code is doing this already)
void em5::MainEvent::setPlayerControl ( bool  playerControl) const
protected

Set player control active / inactive.

void em5::MainEvent::setStartDayTimeAndWeather ( )
protected

Set the current day time and weather of the event.

virtual void em5::MainEvent::showBriefingSupervisorMessage ( )
protectedvirtual

Shows the briefing supervisor message for the event.

Reimplemented in em5::MainEvent200, and em5::MainEvent100.

virtual void em5::MainEvent::showSupervisorMessageForFinalEvaluation ( uint32  pointGain)
protectedvirtual

Shows a supervisor message when the event ends.

Reimplemented in em5::MainEvent01, em5::MainEvent12, and em5::Em20MainEventBase.

void em5::MainEvent::startIntro ( bool  forceNoFadeOut = false)
protected

Start the intro.

void em5::MainEvent::triggerCampaignHeroAchievement ( ) const
protected

The Campaign Hero achievement hase to be triggered on success of the last event in the campign.

virtual void em5::MainEvent::updateFreeplayEvent ( const qsf::Time timePassed)
overridevirtual

Regular update call, gets called once a game tick.

Implements em5::FreeplayEvent.

Friends And Related Function Documentation

friend class MainEventMetaclasses
friend

Member Data Documentation

qsf::MessageProxy em5::MainEvent::mLifeCycleMessageProxy
protected

Listens to messages that affect the lifecycle.

uint32 em5::MainEvent::mMaxEfficiencyPoints
protected
qsf::Time em5::MainEvent::mMaxEfficiencyTime
protected
uint32 em5::MainEvent::mMinEfficiencyPoints
protected
qsf::Time em5::MainEvent::mMinEfficiencyTime
protected
uint32 em5::MainEvent::mNeededPointsForGold
protected
uint32 em5::MainEvent::mNeededPointsForSilver
protected
const std::string em5::MainEvent::SEQUENCE_FADEOUT
static

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