Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 11, 2005, 12:55:48 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: setClassID implemented in all files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/animation/animation_player.cc

    r4485 r4597  
    1 /* 
     1/*
    22   orxonox - the future of 3D-vertical-scrollers
    33
     
    2626   \brief standard constructor
    2727*/
    28 AnimationPlayer::AnimationPlayer () 
     28AnimationPlayer::AnimationPlayer ()
    2929{
    30    this->setClassID(CL_ANIMATION_PLAYER, "AnimationPlayer");
     30  this->setClassID(CL_ANIMATION_PLAYER, "AnimationPlayer");
     31  this->setName("AnimationPlayer");
    3132
    32    this->animationList = new tList<Animation>();
    33    this->play();
     33  this->animationList = new tList<Animation>();
     34  this->play();
    3435}
    3536
     
    4344
    4445   !! DANGER !! when unloading the AnimationPlayer no other Function
    45    should reference any Animations, from the animationList because it 
    46    automatically deletes them. 
     46   should reference any Animations, from the animationList because it
     47   automatically deletes them.
    4748   This usually happens when unloading a World.
    4849*/
    49 AnimationPlayer::~AnimationPlayer () 
     50AnimationPlayer::~AnimationPlayer ()
    5051{
    5152  // deleting the Animation List AND all the elements of the List
     
    6162
    6263   when adding a Animation the Animation will too be deleted when
    63    the AnimationPlayer gets deleted. Consider not adding it, or 
     64   the AnimationPlayer gets deleted. Consider not adding it, or
    6465   unadding it with animation->notHandled();
    6566*/
     
    8081/**
    8182   \brief empties the list AND deletes all the Animations
    82 */ 
     83*/
    8384void AnimationPlayer::flush(void)
    8485{
     
    99100
    100101/**
    101    \brief Ticks all the animations in animationList 
     102   \brief Ticks all the animations in animationList
    102103   \param timePassed the time passed since the last tick.
    103104*/
     
    110111      Animation* anim = animIt->nextElement();
    111112      while( anim != NULL)
    112         {
    113           anim->tick(timePassed);
    114           if(unlikely(anim->ifDelete()))
    115           {
    116             this->animationList->remove(anim);
    117             delete anim;
    118           }
    119           anim = animIt->nextElement();
    120         }
     113        {
     114          anim->tick(timePassed);
     115          if(unlikely(anim->ifDelete()))
     116          {
     117            this->animationList->remove(anim);
     118            delete anim;
     119          }
     120          anim = animIt->nextElement();
     121        }
    121122      delete animIt;
    122123    }
     
    150151    {
    151152      if(anim->getBaseObject() == baseObject)
    152         {
    153           delete animIt;
    154           return anim;
    155         }
     153        {
     154          delete animIt;
     155          return anim;
     156        }
    156157      anim = animIt->nextElement();
    157158    }
Note: See TracChangeset for help on using the changeset viewer.