CAnimation Struct Reference

Entity animation info. More...

#include <animation.h>

List of all members.

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)
 
Parameters:
name Name of the animation.

const std::string & name () const
 
Returns:
The name of the animation.

Cycle methods
void qCycle (const bool bCycle)
 
Parameters:
bCycle Set to true for looping animation, false to stop at end.

bool qCycle () const
 
Returns:
true if animation loops, false if it stops at end.

Tick methods
void qTick (const bool bTick)
 
Parameters:
bTick Set to true if timed based, false for distanced based.

bool qTick () const
 
Returns:
true if time based, false if distanced based

Value methods
void value (const unit fValue)
 
Parameters:
fValue Set to distance (quants) or time (ticks) for a full animation cycle.

unit value () const
 
Returns:
Distance (quants) or time (ticks) for a full animation cycle.

Condition methods
void conditions (const CFlagSet< CGameEntity::eState > &bsState)
 
Parameters:
bsState State(s) that need to be true for this animation to be selected.

void conditions_add (const CGameEntity::eState &state)
 
Parameters:
state State to add as a condition.

void conditions_clear ()
 Clear all conditions.
const CFlagSet
< CGameEntity::eState > & 
conditions () const
 
Returns:
State(s) that need to be true for this animation to be selected.

Event methods
int event_count () const
 
Returns:
The number of animation events.

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"


Detailed Description

Entity animation info.

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.

Author:
Doug Poston
Version:
1.3
Date:
12/28/2007

Constructor & Destructor Documentation

CAnimation::CAnimation ( CXMLNode &  node  ) 

Load animation descriptions from a file.

Parameters:
node XML node.


Member Function Documentation

bool CAnimation::valid ( CXMLNode &  node  )  [static]

Parameters:
node XML node that may contain valid animation data.
Returns:
true if node contains 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.

Parameters:
pGE Pointer to the CGameEntity.
start Starting percent.
end Ending percent.
pGE Pointer to the GE that this effect if coming from.
Returns:
The number of animation events run.


The documentation for this struct was generated from the following files:
Generated on Fri Dec 28 12:55:07 2007 for template7 by  doxygen 1.5.4