Last change
on this file since 3830 was
3821,
checked in by bensch, 20 years ago
|
orxonox/trunk: pause and play function
|
File size:
1.5 KB
|
Line | |
---|
1 | /*! |
---|
2 | \file animation_player.h |
---|
3 | */ |
---|
4 | |
---|
5 | #ifndef _ANIMATION_PLAYER_H |
---|
6 | #define _ANIMATION_PLAYER_H |
---|
7 | |
---|
8 | #include "base_object.h" |
---|
9 | #include "animation.h" |
---|
10 | |
---|
11 | /* FORWARD DEFINITION */ |
---|
12 | |
---|
13 | //! A AnimationPlayer, that handles the animation of all the Animations in the scene. |
---|
14 | /** |
---|
15 | <b>AnimationPlayer usage:</b> \n |
---|
16 | |
---|
17 | <b>Initialisation</b>: AnimationPlayer::getInstance() does the trick this is |
---|
18 | usually done when initializing a world \n |
---|
19 | <b>Adding Animations</b>: create an Animation the following Way: |
---|
20 | \li Anim* animation = new Anim(); // also use any other Subclass of Animation to initialize this |
---|
21 | \li set some parameters: also see the specific classes for more info |
---|
22 | \n |
---|
23 | if you do not want a specific Animation to be handled by the AnimationPlayer, you have to |
---|
24 | unload it explicitely with animation->doNotHandle(); |
---|
25 | \n |
---|
26 | eveything else will be done by the AnimationPlayer itself.\n |
---|
27 | */ |
---|
28 | class AnimationPlayer : public BaseObject { |
---|
29 | |
---|
30 | public: |
---|
31 | static AnimationPlayer* getInstance(void); |
---|
32 | virtual ~AnimationPlayer(void); |
---|
33 | |
---|
34 | // animation handling |
---|
35 | void addAnimation(Anim* animation); |
---|
36 | void removeAnimation(Anim* animation); |
---|
37 | void flush(void); |
---|
38 | |
---|
39 | // time functions |
---|
40 | void tick(float timePassed); |
---|
41 | void play(void); |
---|
42 | void pause(void); |
---|
43 | |
---|
44 | void debug(void); |
---|
45 | |
---|
46 | private: |
---|
47 | /* singleton */ |
---|
48 | AnimationPlayer(void); |
---|
49 | static AnimationPlayer* singletonRef; |
---|
50 | |
---|
51 | /* class specific */ |
---|
52 | tList<Anim>* animationList; //!< A List of Animations to be handled. |
---|
53 | bool bRunning; //!< If the AnimationPlayer is running. |
---|
54 | }; |
---|
55 | |
---|
56 | |
---|
57 | #endif /* _ANIMATION_PLAYER_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.