Changeset 3820 in orxonox.OLD for orxonox/trunk
- Timestamp:
 - Apr 14, 2005, 12:31:09 AM (21 years ago)
 - Location:
 - orxonox/trunk/src
 - Files:
 - 
          
- 3 edited
 
- 
          animation.cc (modified) (2 diffs)
 - 
          animation.h (modified) (2 diffs)
 - 
          animation_player.h (modified) (1 diff)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
        
orxonox/trunk/src/animation.cc
r3816 r3820 24 24 // initialize a beginning KeyFrame, that will be deleted afterwards 25 25 this->bHasKeys = false; 26 this->bHandled = true; 26 27 27 28 // setting default values … … 32 33 } 33 34 34 35 35 Anim::~Anim(void) 36 36 { 37 AnimationPlayer::getInstance()->removeAnimation(this);37 this->doNotHandle(); 38 38 } 39 40 void Anim::doNotHandle(void) 41 { 42 if (this->bHandled) 43 AnimationPlayer::getInstance()->removeAnimation(this); 44 } 45 39 46 40 47 void Anim::setInfinity(ANIM_INFINITY postInfinity)  - 
        
orxonox/trunk/src/animation.h
r3798 r3820 51 51 public: 52 52 virtual ~Anim(void); 53 void doNotHandle(void); 53 54 54 55 void setInfinity(ANIM_INFINITY postInfinity = ANIM_INF_CONSTANT); … … 80 81 81 82 bool bHasKeys; 83 bool bHandled; //!< If this Animation is handled by the AnimationPlayer. 82 84 bool bRunning; 83 85 };  - 
        
orxonox/trunk/src/animation_player.h
r3816 r3820 12 12 13 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 */ 14 28 class AnimationPlayer : public BaseObject { 15 29  
Note: See TracChangeset
          for help on using the changeset viewer.
      


            






