se_core::ActionQueue Class Reference

The action queue stores who is about to perform actions. More...

#include <ActionQueue.hpp>

List of all members.

Public Member Functions

 ActionQueue ()
 ~ActionQueue ()
unsigned short add (ActionComponent &actor, short duration)
 Add and actor that plans to perform an action.
bool disrupt (ActionComponent &actor)
 Remove an ActionComponent from the action queue.
void scheduleNextActions (long when)
 Request ActionComponents that has just perfomed an action to schedule their next action.
void performScheduledActions (long when)
 Ask actors that are scheduled to act this timestep to perform their actions.
void beginNextInitiative ()
 Prepare for next timestep.
void reset ()
 Empty the action queue.


Detailed Description

The action queue stores who is about to perform actions.

You will not access this class directly. You plan actions using ActionComponent::planAction(...), and disrupt them by calling ActionComponent::disrupt(...)

Definition at line 38 of file ActionQueue.hpp.


Constructor & Destructor Documentation

se_core::ActionQueue::ActionQueue  ) 
 

Definition at line 37 of file ActionQueue.cpp.

se_core::ActionQueue::~ActionQueue  ) 
 

Definition at line 51 of file ActionQueue.cpp.


Member Function Documentation

unsigned short se_core::ActionQueue::add ActionComponent actor,
short  duration
 

Add and actor that plans to perform an action.

The ActionQueue does not store the Actions themselves, but instead the actor that is to perform them. When the action is performed, the ActionComponent is requested by the ActionQueue to perform the planned Action.

Definition at line 80 of file ActionQueue.cpp.

void se_core::ActionQueue::beginNextInitiative  ) 
 

Prepare for next timestep.

Definition at line 121 of file ActionQueue.cpp.

bool se_core::ActionQueue::disrupt ActionComponent actor  ) 
 

Remove an ActionComponent from the action queue.

Definition at line 96 of file ActionQueue.cpp.

References se_core::ActionComponent::actionSchedule().

void se_core::ActionQueue::performScheduledActions long  when  ) 
 

Ask actors that are scheduled to act this timestep to perform their actions.

Definition at line 58 of file ActionQueue.cpp.

References se_core::ActionComponent::perform().

void se_core::ActionQueue::reset  ) 
 

Empty the action queue.

Definition at line 146 of file ActionQueue.cpp.

void se_core::ActionQueue::scheduleNextActions long  when  ) 
 

Request ActionComponents that has just perfomed an action to schedule their next action.

Definition at line 70 of file ActionQueue.cpp.

References se_core::ActionComponent::scheduleNextAction().


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

Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:25 2007 by Doxygen version 1.3.9.1.

SourceForge.net Logo