#include <animationPool.h>
Add methods | |
| static int | add_group (const std::string &strGroup, const std::string &strAnim, const unit fDist, const bool bCycle=true, const bool bTick=false) |
| Add an animation group to the pool. | |
| static int | add (const int iGroup, const CFlagSet< CGameEntity::eState > &bsConditions, const std::string &strAnim, const unit fDist, const bool bCycle, const bool bTick=false) |
| Add an animation to a group in the pool. | |
| int | add_group (const std::string &strGroup, CAnimation &defaultAnim) |
| Add an animation group to the pool. | |
| bool | add (const int iGroup, CAnimation &anim) |
| Add an animation to a group in the pool. | |
Get methods | |
| static const CAnimation * | get (const CGameEntity *pGE, const int iGroup=0) |
| Get animation values using the key. | |
| static int | get_index (const std::string &name) |
| const CAnimation * | get_anim (const CGameEntity *pGE, const int iGroup=0) |
| Get animation values using the key. | |
Static Public Member Functions | |
Load/Reload methods | |
| static bool | load (CXMLNode node) |
| Load animation descriptions from an XML node. | |
| static bool | load (const std::string &filepath) |
| Load animation descriptions from a file. | |
| static bool | load (const std::string &filename, const std::string &path) |
| Load animation descriptions from a file. | |
| static bool | reload (CXMLNode node) |
| Dump the old pool and reload animation descriptions from a file. | |
| static void | clear () |
| Clear out the entire pool. | |
Info methods | |
| static int | size () |
| |
Static Public Attributes | |
| static const char * | m_kStrElmAnimationPool = "AnimationPool" |
| XML element strings. | |
Static Protected Member Functions | |
| static CAnimationPool * | instance () |
| only static methods have access to this class | |
(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.
| bool CAnimationPool::load | ( | CXMLNode | node | ) | [static] |
Load animation descriptions from an XML node.
| node | XML node |
bad group
| bool CAnimationPool::load | ( | const std::string & | filepath | ) | [static] |
Load animation descriptions from a file.
| filepath | Full path of the XML file containing the Animation node. |
| bool CAnimationPool::load | ( | const std::string & | filename, | |
| const std::string & | path | |||
| ) | [static] |
Load animation descriptions from a file.
| filename | Name of the XML file containing the Animation node. | |
| path | Path containing the XML file. |
| bool CAnimationPool::reload | ( | CXMLNode | node | ) | [static] |
Dump the old pool and reload animation descriptions from a file.
| node | XML node |
| int CAnimationPool::add_group | ( | const std::string & | strGroup, | |
| const std::string & | strAnim, | |||
| const unit | fDist, | |||
| const bool | bCycle = true, |
|||
| const bool | bTick = false | |||
| ) | [static] |
Add an animation group to the pool.
| strGroup | Name of the group | |
| strAnim | Name of the default animation | |
| fDist | Distance (quants) or time (ticks) of the default animation | |
| bCycle | Dose the default animation cycle (loop)? | |
| bTick | True if time based, otherwise depends on passed in value (normally distance). |
| int CAnimationPool::add_group | ( | const std::string & | strGroup, | |
| CAnimation & | defaultAnim | |||
| ) |
Add an animation group to the pool.
| strGroup | Name of the group | |
| defaultAnim | CAnimation struct that contains the default animation |
| int CAnimationPool::add | ( | const int | iGroup, | |
| const CFlagSet< CGameEntity::eState > & | bsConditions, | |||
| const std::string & | strAnim, | |||
| const unit | fDist, | |||
| const bool | bCycle, | |||
| const bool | bTick = false | |||
| ) | [static] |
Add an animation to a group in the pool.
| iGroup | Which group we are adding to | |
| bsConditions | Conditions that must be passed to select this animation | |
| strAnim | Name of the animation | |
| fDist | Distance (quants) or time (ticks) in a full animation | |
| bCycle | Dose this animation cycle (loop)? | |
| bTick | Dose this animation use ticks to animate? |
| bool CAnimationPool::add | ( | const int | iGroup, | |
| CAnimation & | anim | |||
| ) |
Add an animation to a group in the pool.
| iGroup | Which group we are adding to | |
| anim | CAnimation struct we are adding |
| const CAnimation * CAnimationPool::get | ( | const CGameEntity * | pGE, | |
| const int | iGroup = 0 | |||
| ) | [static] |
Get animation values using the key.
| pGE | Pointer to the game entity | |
| iGroup | Which group we are looking in |
| const CAnimation * CAnimationPool::get_anim | ( | const CGameEntity * | pGE, | |
| const int | iGroup = 0 | |||
| ) |
Get animation values using the key.
| pGE | Pointer to the game entity | |
| iGroup | Which group we are looking in |
| int CAnimationPool::get_index | ( | const std::string & | name | ) | [static] |
| name | String containing the name of the group we want the index to |
1.5.4