Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/animation_player.h @ 3820

Last change on this file since 3820 was 3820, checked in by bensch, 19 years ago

orxonox/trunk: more descriptive comments

File size: 1.4 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*/
28class AnimationPlayer : public BaseObject {
29
30 public:
31  static AnimationPlayer* getInstance(void);
32  virtual ~AnimationPlayer(void);
33
34  void addAnimation(Anim* animation);
35  void removeAnimation(Anim* animation);
36  void flush(void);
37
38  void tick(float timePassed);
39
40  void debug(void);
41
42 private:
43  /* singleton */
44  AnimationPlayer(void);
45  static AnimationPlayer* singletonRef;
46
47  /* class specific */
48  tList<Anim>* animationList;              //!< A List of Animations to be handled
49};
50
51
52#endif /* _ANIMATION_PLAYER_H */
Note: See TracBrowser for help on using the repository browser.