Emergency 20 Dokumentation  4.2.0
em5::OrderUnitCommandMode Class Reference

Order unit command mode. More...

#include <OrderUnitCommandMode.h>

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

Public Member Functions

 OrderUnitCommandMode ()
 Default constructor. More...
 
virtual ~OrderUnitCommandMode ()
 Destructor. More...
 
void initialize (const OrderInfo &orderInfo, uint32 numberToOrder=1, OrderInfo::OrderPairList orderPairList=OrderInfo::OrderPairList())
 Fill class with all necessary variables. More...
 
void setOrderOnlyInThisAreaEntity (qsf::Entity *orderOnlyInThisAreaEntity)
 Sets the entity instance which defines the area in which an ordering should only be possible. More...
 
const OrderInfogetOrderInfo () const
 
uint32 getNumberToOrder () const
 
void setNumberToOrder (uint32 numberToOrder)
 
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 SpawnUnitActionorderUnit (const OrderInfo &orderInfo, Player &player, const OrderInfo::OrderPairList &orderPairList, const glm::vec3 &targetPosition, const glm::quat *targetRotation=nullptr)
 

Static Public Attributes

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

Additional Inherited Members

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

Detailed Description

Order unit command mode.

Remarks
This command mode lets the user select a position where to send an ordered unit to

Constructor & Destructor Documentation

em5::OrderUnitCommandMode::OrderUnitCommandMode ( )

Default constructor.

virtual em5::OrderUnitCommandMode::~OrderUnitCommandMode ( )
virtual

Destructor.

Member Function Documentation

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

Process command execution.

Reimplemented from qsf::game::CommandMode.

uint32 em5::OrderUnitCommandMode::getNumberToOrder ( ) const
const OrderInfo* em5::OrderUnitCommandMode::getOrderInfo ( ) const
void em5::OrderUnitCommandMode::initialize ( const OrderInfo orderInfo,
uint32  numberToOrder = 1,
OrderInfo::OrderPairList  orderPairList = OrderInfo::OrderPairList() 
)

Fill class with all necessary variables.

Parameters
[in]orderInfoThe order information of the type of unit to order; instance must stay valid as long as this instance exists
[in]numberToOrderNumber of vehicles to order, the default value is one
static SpawnUnitAction* em5::OrderUnitCommandMode::orderUnit ( const OrderInfo orderInfo,
Player player,
const OrderInfo::OrderPairList orderPairList,
const glm::vec3 &  targetPosition,
const glm::quat *  targetRotation = nullptr 
)
static
void em5::OrderUnitCommandMode::setNumberToOrder ( uint32  numberToOrder)
void em5::OrderUnitCommandMode::setOrderOnlyInThisAreaEntity ( qsf::Entity orderOnlyInThisAreaEntity)

Sets the entity instance which defines the area in which an ordering should only be possible.

Parameters
[in]orderOnlyInThisAreaEntityThe entity which defines the order only area, can be a nullptr to disable this restriction
virtual void em5::OrderUnitCommandMode::shutdown ( )
overridevirtual

Shutdown.

Note
  • The default implementation is empty

Reimplemented from qsf::game::CommandMode.

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

Startup.

Note
  • The default implementation is empty

Reimplemented from qsf::game::CommandMode.

virtual void em5::OrderUnitCommandMode::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::OrderUnitCommandMode::PLUGINABLE_ID
static

"em5::OrderUnitCommandMode" unique command pluginable ID


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