Emergency 20 Dokumentation  4.2.0
em5::DefaultCommandMode Class Reference

Default command mode for EMERGENCY 5. More...

#include <DefaultCommandMode.h>

Inheritance diagram for em5::DefaultCommandMode:
qsf::game::CommandMode

Public Member Functions

 DefaultCommandMode ()
 Default constructor. More...
 
virtual ~DefaultCommandMode ()
 Destructor. More...
 
qsf::Time getWaitTimeBetweenChecks () const
 
void setWaitTimeBetweenChecks (const qsf::Time &waitTimeBetweenChecks)
 
void onRayMapQueryResponse (const RayMapQueryResponse &rayMapQueryResponse)
 
uint64 getMouseoverHighlightedEntityId () const
 Return the ID of the currently highlighted entity. More...
 
void setOnlyCommandHighlightingEntity (qsf::Entity *commandHighlightOnlyThisEntity)
 Sets the entity instance for which the command highlighting should only be done. More...
 
virtual void startup () override
 Startup. More...
 
virtual void shutdown () override
 Shutdown. More...
 
virtual bool executeCommandContext (qsf::game::CommandContext &commandContext, const EntityIdSet &callerIds) override
 Process command execution. More...
 
virtual void updateCommandMode (const qsf::Clock &clock) override
 Regular update. More...
 
- Public Member Functions inherited from qsf::game::CommandMode
 CommandMode (uint32 commandId)
 Default constructor. More...
 
virtual ~CommandMode ()
 Destructor. More...
 
uint32 getId () const
 Get command mode ID, which is the command mode's PLUGINABLE_ID. More...
 

Static Public Member Functions

static void showVisualCommandFeedback (const qsf::game::CommandContext &context)
 Shows a visual feedback. More...
 
static bool isUnitAllowedForSelection (const CommandableComponent &commandableComponent)
 Returns if the unit is allowed for selection. More...
 
static bool isUnitAllowedForSelection (const qsf::Entity &entity)
 Returns if the unit is allowed for selection. More...
 

Static Public Attributes

static const uint32 PLUGINABLE_ID
 "em5::DefaultCommandMode" unique command mode pluginable ID More...
 

Additional Inherited Members

- Public Types inherited from qsf::game::CommandMode
typedef boost::container::flat_set< uint64EntityIdSet
 

Detailed Description

Default command mode for EMERGENCY 5.

Constructor & Destructor Documentation

em5::DefaultCommandMode::DefaultCommandMode ( )

Default constructor.

virtual em5::DefaultCommandMode::~DefaultCommandMode ( )
virtual

Destructor.

Member Function Documentation

virtual bool em5::DefaultCommandMode::executeCommandContext ( qsf::game::CommandContext commandContext,
const EntityIdSet callerIds 
)
overridevirtual

Process command execution.

Reimplemented from qsf::game::CommandMode.

uint64 em5::DefaultCommandMode::getMouseoverHighlightedEntityId ( ) const

Return the ID of the currently highlighted entity.

qsf::Time em5::DefaultCommandMode::getWaitTimeBetweenChecks ( ) const
static bool em5::DefaultCommandMode::isUnitAllowedForSelection ( const CommandableComponent commandableComponent)
static

Returns if the unit is allowed for selection.

Parameters
[in]commandableComponentThe commandable component of the unit to check
Note
  • A unit is allowed for selection, if the unit belongs to the current player (when this option is active) or the unit is injured/destroyed
static bool em5::DefaultCommandMode::isUnitAllowedForSelection ( const qsf::Entity entity)
static

Returns if the unit is allowed for selection.

Parameters
[in]entityThe entity to check
Returns
"true" when the entity is a unit and belongs to the current player
void em5::DefaultCommandMode::onRayMapQueryResponse ( const RayMapQueryResponse rayMapQueryResponse)
void em5::DefaultCommandMode::setOnlyCommandHighlightingEntity ( qsf::Entity commandHighlightOnlyThisEntity)

Sets the entity instance for which the command highlighting should only be done.

Parameters
[in]commandHighlightOnlyThisEntityThe entity for which only command highlighting should be done, can be a nullptr to disable this restriction
void em5::DefaultCommandMode::setWaitTimeBetweenChecks ( const qsf::Time waitTimeBetweenChecks)
static void em5::DefaultCommandMode::showVisualCommandFeedback ( const qsf::game::CommandContext context)
static

Shows a visual feedback.

virtual void em5::DefaultCommandMode::shutdown ( )
overridevirtual

Shutdown.

Note
  • The default implementation is empty

Reimplemented from qsf::game::CommandMode.

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

Startup.

Note
  • The default implementation is empty

Reimplemented from qsf::game::CommandMode.

virtual void em5::DefaultCommandMode::updateCommandMode ( const qsf::Clock clock)
overridevirtual

Regular update.

Note
  • The default implementation is empty

Reimplemented from qsf::game::CommandMode.

Member Data Documentation

const uint32 em5::DefaultCommandMode::PLUGINABLE_ID
static

"em5::DefaultCommandMode" unique command mode pluginable ID


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