Emergency 20 Dokumentation  4.2.0
em5::EscapeAction Class Reference

EMERGENCY 5 base escape action. More...

#include <EscapeAction.h>

Inheritance diagram for em5::EscapeAction:
qsf::ai::MoveAction qsf::Action qsf::Object em5::EscapeCarLongAction em5::EscapeCarShortAction em5::EscapeFootLongAction em5::EscapeFootShortAction em5::EscapeHidingFootAction

Public Member Functions

virtual void catched ()
 This entity got catched. More...
 
virtual bool onStartup () override
 Called when the action gets active (i.e. switches to the "running" state) for the first time. More...
 
- Public Member Functions inherited from qsf::ai::MoveAction
 MoveAction ()
 
void init (NavigationGoal *goal, unsigned int movementModeId=getUninitialized< unsigned int >(), Path *path=nullptr)
 
void setReactionToFailedGoal (action::Result reaction)
 
unsigned int getMovementModeId () const
 
virtual action::Result updateAction (const Clock &clock) override
 Update the action. More...
 
virtual void onShutdown () override
 Called before the action gets removed, in case it was active at least once since its creation. More...
 
virtual void onPause () override
 Called when the action gets interrupted by another action, but not removed. More...
 
virtual void onResume () override
 Called when the action gets active again after it was paused. More...
 
virtual void serialize (BinarySerializer &serializer) override
 Serialize or deserialize the action using a binary serializer. More...
 
- Public Member Functions inherited from qsf::Action
virtual ~Action ()
 Destructor. More...
 
uint32 getTypeId () const
 Return the action's type ID. More...
 
ActionComponentgetComponent () const
 Return the owning action component. More...
 
EntitygetEntity () const
 Return the owning entity. More...
 
uint64 getEntityId () const
 Return the owning entity's ID. More...
 
MapgetMap () const
 Return the map the action's owning entity is in. More...
 
process::State getState () const
 Return the action's process state. More...
 
action::Result update (const Clock &clock)
 Update the action. More...
 
void shutdown ()
 Called before the action gets removed. More...
 
void pause ()
 Called when the action gets interrupted by another action, but not removed. More...
 
action::Priority getPriority () const
 Get action priority. More...
 
void setPriority (action::Priority priority)
 Set action priority. 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...
 

Protected Member Functions

 EscapeAction (uint32 actionId)
 Constructor. More...
 
virtual ~EscapeAction ()
 Destructor. More...
 
qsf::EntitygetTargetEntity () const
 
bool checkAllowUpdate () const
 
void pushBreathAnimation (qsf::Time animationTime)
 
- Protected Member Functions inherited from qsf::ai::MoveAction
 MoveAction (uint32 actionId)
 
const WeakPtr< NavigationComponent > & getNavigationComponent () const
 
std::auto_ptr< NavigationGoal > & getGoal ()
 
- Protected Member Functions inherited from qsf::Action
 Action (uint32 actionTypeId)
 Constructor. More...
 
virtual void onAbort ()
 Called before the action gets removed, in case it was never active. More...
 
- Protected Member Functions inherited from qsf::Object
 Object ()
 Default constructor. More...
 

Protected Attributes

bool mIsCivilPerson
 
std::string mEscapeTargetTag
 Event tag of the target entity; usually empty, except a certain target is forced. More...
 
qsf::WeakPtr< GameComponentmGameComponent
 
- Protected Attributes inherited from qsf::Action
action::Priority mPriority
 Action with higher priority get evaluated first; default value is 100. More...
 
bool mIsScriptAction
 True if action is loaded via script. More...
 

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 }
 
- Static Public Attributes inherited from qsf::ai::MoveAction
static const NamedIdentifier ACTION_ID
 

Detailed Description

EMERGENCY 5 base escape action.

Constructor & Destructor Documentation

em5::EscapeAction::EscapeAction ( uint32  actionId)
explicitprotected

Constructor.

virtual em5::EscapeAction::~EscapeAction ( )
protectedvirtual

Destructor.

Member Function Documentation

virtual void em5::EscapeAction::catched ( )
virtual

This entity got catched.

Reimplemented in em5::EscapeFootLongAction, and em5::EscapeFootShortAction.

bool em5::EscapeAction::checkAllowUpdate ( ) const
protected
qsf::Entity* em5::EscapeAction::getTargetEntity ( ) const
protected
virtual bool em5::EscapeAction::onStartup ( )
overridevirtual

Called when the action gets active (i.e. switches to the "running" state) for the first time.

Returns
true if startup succeeded, false otherwise

Reimplemented from qsf::ai::MoveAction.

void em5::EscapeAction::pushBreathAnimation ( qsf::Time  animationTime)
protected

Member Data Documentation

std::string em5::EscapeAction::mEscapeTargetTag
protected

Event tag of the target entity; usually empty, except a certain target is forced.

qsf::WeakPtr<GameComponent> em5::EscapeAction::mGameComponent
protected
bool em5::EscapeAction::mIsCivilPerson
protected

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