#include <ActionComponent.hpp>
Inheritance diagram for se_core::ActionComponent:
Public Types | |
typedef ComponentPtr< ActionComponent, sct_ACTION > | Ptr |
enum | { fb_UNDEFINED, fb_SPEECH_FINISHED, fb_USER_DEFINED } |
Public Member Functions | |
ActionComponent (Composite *owner) | |
Constructor. | |
~ActionComponent () | |
Destructor. | |
void | planAction (short channel, const Action &action, const Parameter *parameter=0) const |
Plan a new action. | |
void | planAction (short channel, const ActionAndParameter &action) const |
void | planActionIfNone (short channel, const ActionAndParameter &action) const |
void | clearPlannedAction (short channel) const |
Clear planned action. | |
void | disrupt () |
Disrupt all actions the this ActionComponent has in the ActionQueue. | |
void | resume () |
Resume disrupted/paused script. | |
bool | disrupt (short channel) |
Disrupt an action the this ActionComponent has in a given ActionQueue channel. | |
void | unpause (short channel) |
Insert paused action into action queue. | |
void | scheduleForDestruction () |
Schedule this ActionComponent for destruction. | |
void | resetActionFeed () |
void | castFeedbackEvent (int type) |
void | setActionFeed (ActionFeed *feed) |
void | setActive (bool state) |
Called by Composite. | |
void | setScriptActive (bool state) |
virtual const char * | name () const |
By default returns name of composite, which returns name of composite factory. | |
Composite * | owner () |
const Composite * | owner () const |
Component type. | |
Component * | component (int type) |
const Component * | component (int type) const |
int | type () const |
const ComponentFactory * | factory () |
bool | isActive () |
bool | isDead () const |
Protected Member Functions | |
void | cleanup () |
Called by Composite. | |
void | perform (long when, short channel) |
Perform an already scheduled Action. | |
void | scheduleNextAction (long when, short channel) |
Schedule next action. | |
unsigned short | actionSchedule (short channel) |
Get the ActionQueue index for when the action in a give channel is scheduled to be performed. | |
void | continueAction (long when, short channel) |
void | scheduleNextAction (short channel) |
void | nextScriptAction (short channel) |
Ask currently running script for the next action in a channel. | |
virtual void | setDead () |
Called by Composite. | |
virtual void | parentChanged (Composite *newParent, Composite *oldParent) |
Called by Composite. | |
virtual void | zoneChanged (int type, Composite *newArea, Composite *oldArea) |
Called by Composite. | |
virtual void | init () |
Called by Composite. | |
Protected Attributes | |
ActionAndParameter | presentAction_ [CHANNEL_COUNT] |
ActionAndParameter | plannedAction_ [CHANNEL_COUNT] |
unsigned short | presentActionScheduledComplete_ [CHANNEL_COUNT] |
ActionFeed * | feed_ |
int | type_ |
The type of Component. | |
Composite * | owner_ |
const ComponentFactory * | factory_ |
Friends | |
class | ActionQueue |
class | Composite |
ActionComponents are the atoms of game-character behaviour in SagaEngine. They define what a character can do.
Definition at line 41 of file ActionComponent.hpp.
|
Definition at line 43 of file ActionComponent.hpp. |
|
Definition at line 104 of file ActionComponent.hpp. |
|
Constructor.
Definition at line 30 of file ActionComponent.cpp. References se_core::sct_ACTION. |
|
Destructor.
Definition at line 39 of file ActionComponent.cpp. |
|
Get the ActionQueue index for when the action in a give channel is scheduled to be performed. Don't call this method yourself. It is a helper function for ActionQueue's disrupt(). Definition at line 138 of file ActionComponent.hpp. Referenced by se_core::ActionQueue::disrupt(). |
|
Definition at line 223 of file ActionComponent.cpp. References se_core::Action::feedbackEvent(). |
|
Called by Composite.
Reimplemented from se_core::Component. Definition at line 44 of file ActionComponent.cpp. |
|
Clear planned action. Clear an action that is waiting for being entered into the ActionQueue, but hasn't yet gotten there (because another Action for the same ActionComponent and channel is already in the queue). Definition at line 129 of file ActionComponent.cpp. |
|
Definition at line 71 of file Component.hpp. References se_core::Component::component(). |
|
Definition at line 67 of file Component.hpp. References se_core::Composite::component(). Referenced by se_core::Component::component(), se_core::Component::ComponentPtr< T, type >::ComponentPtr(), se_ogre::O3dThingComponent::get(), se_ogre::O3dNodeComponent::get(), and se_ogre::O3dAreaComponent::get(). |
|
Definition at line 78 of file ActionComponent.cpp. References se_core::Action::doPause(), se_core::Action::duration(), and se_core::Parameter::incrActionStage(). |
|
Disrupt an action the this ActionComponent has in a given ActionQueue channel. Actions that are performed in the on-going initiative are not disrupted. Definition at line 157 of file ActionComponent.cpp. References se_core::Action::disrupt(). |
|
Disrupt all actions the this ActionComponent has in the ActionQueue. Actions that are performed in the on-going initiative are not disrupted. Definition at line 135 of file ActionComponent.cpp. |
|
Definition at line 81 of file Component.hpp. Referenced by se_core::Composite::releaseComponents(). |
|
Called by Composite.
Reimplemented in se_core::RootComponent, se_core::SignalAreaComponent, se_ogre::O3dAreaComponent, and se_ogre::O3dThingComponent. Definition at line 42 of file Component.cpp. Referenced by se_core::Composite::init(). |
|
Definition at line 26 of file Component.cpp. |
|
Definition at line 31 of file Component.cpp. Referenced by se_core::Actor::affect(). |
|
By default returns name of composite, which returns name of composite factory.
Reimplemented in se_core::CutsceneAreaComponent, se_core::CutsceneComponent, se_core::CutsceneManager, se_core::CollisionAreaComponent, se_core::SignalAreaComponent, se_core::SignalComponent, se_core::SpawnAreaComponent, se_core::SpawnManager, se_core::ZoneAreaComponent, se_core::ZoneComponent, se_core::ZoneManager, se_basic::NavMeshAreaComponent, se_basic::NavMeshComponent, and se_basic::NavMeshManager. Definition at line 21 of file Component.cpp. Referenced by se_core::Area::addNeighbour(), se_core::DefaultTC::collide(), se_core::CoDefault::collide(), se_basic::Say::perform(), and se_ogre::SpeechBubble::speechEvent(). |
|
Ask currently running script for the next action in a channel.
Definition at line 175 of file ActionComponent.cpp. References se_core::ActionAndParameter::hasAction(). |
|
Component type.
Definition at line 62 of file Component.hpp. |
|
|
Called by Composite.
Reimplemented in se_core::AreaChildComponent, and se_core::NodeComponent. Definition at line 101 of file Component.hpp. Referenced by se_core::Composite::resetParent(), and se_core::Composite::setParent(). |
|
Perform an already scheduled Action. Don't call this method yourself. It is used by the ActionQueue. Definition at line 162 of file ActionComponent.hpp. References se_core::Action::perform(). Referenced by se_core::ActionQueue::performScheduledActions(). |
|
Definition at line 111 of file ActionComponent.cpp. References se_core::ActionAndParameter::hasAction(). |
|
Plan a new action. Plan an Action that will be scheduled when the present one is finished. Will overwrite any action that is presently planned but not yet in the ActionQueue. Definition at line 99 of file ActionComponent.cpp. |
|
Definition at line 122 of file ActionComponent.cpp. |
|
Definition at line 100 of file ActionComponent.hpp. |
|
Resume disrupted/paused script.
Definition at line 143 of file ActionComponent.cpp. |
|
Schedule this ActionComponent for destruction. It will be destroyed when the on-going initative is performed, allowing the actor to complete any action it is performing this initiative. |
|
Definition at line 53 of file ActionComponent.cpp. References Assert, se_core::Action::doPause(), se_core::Action::duration(), se_core::Action::prepare(), se_core::Parameter::resetActionStage(), and se_core::Parameter::setChannel(). |
|
Schedule next action. Schedule the next action when the present one is finished. The next action may be:
Definition at line 170 of file ActionComponent.hpp. References se_core::ActionAndParameter::action(), se_core::ActionAndParameter::hasAction(), se_core::Action::isContinuing(), se_core::ActionAndParameter::isDisrupted(), se_core::Action::isRepeating(), se_core::ActionAndParameter::parameter(), se_core::ActionAndParameter::resetAction(), and se_core::ActionAndParameter::setDisrupted(). Referenced by se_core::ActionQueue::scheduleNextActions(). |
|
Definition at line 188 of file ActionComponent.cpp. References AssertFatal. |
|
Called by Composite.
Reimplemented from se_core::Component. Definition at line 216 of file ActionComponent.cpp. References LogDetail. |
|
Called by Composite.
Reimplemented in se_core::SignalComponent, and se_core::SpawnComponent. Definition at line 97 of file Component.hpp. Referenced by se_core::Composite::scheduleForDestruction(). |
|
Definition at line 195 of file ActionComponent.cpp. |
|
Definition at line 76 of file Component.hpp. Referenced by se_core::Composite::component(). |
|
Insert paused action into action queue.
Definition at line 91 of file ActionComponent.cpp. References se_core::Action::duration(). |
|
Called by Composite.
Reimplemented in se_core::AreaChildComponent, se_core::CollisionComponent, and se_core::SignalComponent. Definition at line 37 of file Component.cpp. Referenced by se_core::Composite::zoneChanged(). |
|
Definition at line 112 of file ActionComponent.hpp. |
|
Definition at line 89 of file Component.hpp. |
|
Definition at line 120 of file Component.hpp. |
|
Definition at line 155 of file ActionComponent.hpp. |
|
Definition at line 118 of file Component.hpp. |
|
Definition at line 150 of file ActionComponent.hpp. |
|
Definition at line 149 of file ActionComponent.hpp. |
|
Definition at line 152 of file ActionComponent.hpp. |
|
The type of Component.
Definition at line 117 of file Component.hpp. |
Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:25 2007 by Doxygen version 1.3.9.1.