#include <animation.h>
Public Member Functions | ||||
Create methods | ||||
CAnimation (const std::string &name, const CFlagSet< CGameEntity::eState > &bsState, const unit fValue, const bool bTick=true, const bool bCycle=true) | ||||
CAnimation (CXMLNode &node) | ||||
Name methods | ||||
void | name (const std::string &name) | |||
| ||||
const std::string & | name () const | |||
| ||||
Cycle methods | ||||
void | qCycle (const bool bCycle) | |||
| ||||
bool | qCycle () const | |||
| ||||
Tick methods | ||||
void | qTick (const bool bTick) | |||
| ||||
bool | qTick () const | |||
| ||||
Value methods | ||||
void | value (const unit fValue) | |||
| ||||
unit | value () const | |||
| ||||
Condition methods | ||||
void | conditions (const CFlagSet< CGameEntity::eState > &bsState) | |||
| ||||
void | conditions_add (const CGameEntity::eState &state) | |||
| ||||
void | conditions_clear () | |||
Clear all conditions. | ||||
const CFlagSet < CGameEntity::eState > & | conditions () const | |||
| ||||
Event methods | ||||
int | event_count () const | |||
| ||||
int | event_run (CGameEntity *pGE, const unit start, const unit end) const | |||
Static Public Member Functions | ||||
static bool | valid (CXMLNode &node) | |||
Static Public Attributes | ||||
XML tags | ||||
static const char * | m_kStrAttName = "name" | |||
static const char * | m_kStrAttTick = "tick" | |||
static const char * | m_kStrAttDist = "dist" | |||
static const char * | m_kStrAttCycle = "cycle" | |||
static const char * | m_kStrAttFlag = "flag" | |||
static const char * | m_kStrElmCondition = "Condition" | |||
static const char * | m_kStrElmEvent = "Event" |
Manages animation information, conditions to run, and pointers to animation effects.
(c) 2007-2008 oP group Germany GbR. All rights reserved.
This source code is provided "as is" with no warranty and must not be distributed without written permission.
CAnimation::CAnimation | ( | CXMLNode & | node | ) |
Load animation descriptions from a file.
node | XML node. |
bool CAnimation::valid | ( | CXMLNode & | node | ) | [static] |
node | XML node that may contain valid animation data. |
int CAnimation::event_run | ( | CGameEntity * | pGE, | |
const unit | start, | |||
const unit | end | |||
) | const |
Run event only if its trigger point falls between the two values passed in.
pGE | Pointer to the CGameEntity. | |
start | Starting percent. | |
end | Ending percent. | |
pGE | Pointer to the GE that this effect if coming from. |