hoa_map::private_map::SpriteAction Class Reference

An abstract class for sprite actions. More...

#include <map_actions.h>

Inheritance diagram for hoa_map::private_map::SpriteAction:

Inheritance graph
[legend]
Collaboration diagram for hoa_map::private_map::SpriteAction:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void Execute ()=0
 Executes the sprite's action.
const bool IsFinished ()
 Inidicates if the action is finished or not.
bool IsFinishedReset ()
 Inidicates if the action is finished or not and resets the finished member if it is.
bool IsForced () const
 This method returns if this action is forced (true) or not (false). A forced action will have to finish in order to let a dialogue continue to its next line.
void SetFinished (bool fin)
void SetForced (bool forc)
void SetSprite (VirtualSprite *sp)
 SpriteAction (VirtualSprite *sprite)
virtual ~SpriteAction ()

Protected Attributes

bool _finished
 Set to true when the action has finished its execution.
bool _forced
 This contains if the action should be forced to finish or not during a dialogue.
VirtualSprite_sprite
 A pointer to the map sprite that this action is performed upon.

Detailed Description

An abstract class for sprite actions.

****************************************************************************

Map sprites can perform a variety of different actions, from movement to emotional animation. This class serves as a parent class for the common actions that sprites can take. The children classes are provided as a convenience to the map designer and for code re-usablity. The map script may also create custom actions for sprites to take in addition to the actions provided in this class.

Definition at line 40 of file map_actions.h.


Constructor & Destructor Documentation

hoa_map::private_map::SpriteAction::SpriteAction ( VirtualSprite sprite  )  [inline]

Definition at line 42 of file map_actions.h.

virtual hoa_map::private_map::SpriteAction::~SpriteAction (  )  [inline, virtual]

Definition at line 45 of file map_actions.h.


Member Function Documentation

virtual void hoa_map::private_map::SpriteAction::Execute (  )  [pure virtual]

Executes the sprite's action.

Implemented in hoa_map::private_map::ActionPathMove, hoa_map::private_map::ActionRandomMove, and hoa_map::private_map::ActionAnimate.

const bool hoa_map::private_map::SpriteAction::IsFinished (  )  [inline]

Inidicates if the action is finished or not.

Returns:
True if the action is finished, false if it is not.

Definition at line 54 of file map_actions.h.

References _finished.

bool hoa_map::private_map::SpriteAction::IsFinishedReset (  )  [inline]

Inidicates if the action is finished or not and resets the finished member if it is.

Returns:
True if the action is finished, false if it is not.
Note:
This is not a normal class member act

Definition at line 61 of file map_actions.h.

References _finished.

bool hoa_map::private_map::SpriteAction::IsForced (  )  const [inline]

This method returns if this action is forced (true) or not (false). A forced action will have to finish in order to let a dialogue continue to its next line.

Definition at line 67 of file map_actions.h.

References _forced.

void hoa_map::private_map::SpriteAction::SetFinished ( bool  fin  )  [inline]

Definition at line 70 of file map_actions.h.

References _finished.

void hoa_map::private_map::SpriteAction::SetForced ( bool  forc  )  [inline]

Definition at line 73 of file map_actions.h.

References _forced.

void hoa_map::private_map::SpriteAction::SetSprite ( VirtualSprite sp  )  [inline]

Definition at line 76 of file map_actions.h.

References _sprite.

Referenced by hoa_map::private_map::VirtualSprite::AddAction().


Member Data Documentation

bool hoa_map::private_map::SpriteAction::_finished [protected]

Set to true when the action has finished its execution.

Definition at line 84 of file map_actions.h.

Referenced by hoa_map::private_map::ActionAnimate::Execute(), hoa_map::private_map::ActionRandomMove::Execute(), hoa_map::private_map::ActionPathMove::Execute(), IsFinished(), IsFinishedReset(), and SetFinished().

bool hoa_map::private_map::SpriteAction::_forced [protected]

This contains if the action should be forced to finish or not during a dialogue.

Definition at line 87 of file map_actions.h.

Referenced by IsForced(), and SetForced().

VirtualSprite* hoa_map::private_map::SpriteAction::_sprite [protected]

A pointer to the map sprite that this action is performed upon.

Definition at line 81 of file map_actions.h.

Referenced by hoa_map::private_map::ActionAnimate::Execute(), hoa_map::private_map::ActionRandomMove::Execute(), hoa_map::private_map::ActionPathMove::Execute(), and SetSprite().


The documentation for this class was generated from the following file:
Generated on Fri Jul 6 23:14:58 2007 for Hero of Allacrost by  doxygen 1.5.1