Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 28, 2009, 10:48:47 PM (15 years ago)
Author:
landauf
Message:

Realized Timer doesn't have to be a template, hence merged TimerBase, Timer and StaticTimer.
Removed the object pointer from Timer for memberfunctions, use createFunctor(f, object) instead.

Location:
code/branches/core5/src/orxonox/worldentities
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/orxonox/worldentities/BigExplosion.cc

    r5801 r5831  
    9090            this->setVelocity(velocity);
    9191
    92             this->destroyTimer_.setTimer(rnd(2, 4), false, this, createExecutor(createFunctor(&BigExplosion::stop)));
     92            this->destroyTimer_.setTimer(rnd(2, 4), false, createExecutor(createFunctor(&BigExplosion::stop, this)));
    9393        }
    9494        this->registerVariables();
     
    329329        {
    330330            this->bStop_ = true;
    331             this->destroyTimer_.setTimer(1.0f, false, this, createExecutor(createFunctor(&BigExplosion::destroy)));
     331            this->destroyTimer_.setTimer(1.0f, false, createExecutor(createFunctor(&BigExplosion::destroy, this)));
    332332        }
    333333    }
  • code/branches/core5/src/orxonox/worldentities/BigExplosion.h

    r5791 r5831  
    9898
    9999            LODParticle::Value    LOD_;
    100             Timer<BigExplosion>   destroyTimer_;
     100            Timer                 destroyTimer_;
    101101    };
    102102}
  • code/branches/core5/src/orxonox/worldentities/ExplosionChunk.cc

    r5801 r5831  
    7979            this->setVelocity(velocity);
    8080
    81             this->destroyTimer_.setTimer(rnd(1, 2), false, this, createExecutor(createFunctor(&ExplosionChunk::stop)));
     81            this->destroyTimer_.setTimer(rnd(1, 2), false, createExecutor(createFunctor(&ExplosionChunk::stop, this)));
    8282        }
    8383
     
    132132        {
    133133            this->bStop_ = true;
    134             this->destroyTimer_.setTimer(1.0f, false, this, createExecutor(createFunctor(&ExplosionChunk::destroy)));
     134            this->destroyTimer_.setTimer(1.0f, false, createExecutor(createFunctor(&ExplosionChunk::destroy, this)));
    135135        }
    136136    }
  • code/branches/core5/src/orxonox/worldentities/ExplosionChunk.h

    r5791 r5831  
    6060            ParticleInterface*    smoke_;
    6161            LODParticle::Value    LOD_;
    62             Timer<ExplosionChunk> destroyTimer_;
     62            Timer                destroyTimer_;
    6363    };
    6464}
  • code/branches/core5/src/orxonox/worldentities/MovableEntity.cc

    r5801 r5831  
    9898    void MovableEntity::clientConnected(unsigned int clientID)
    9999    {
    100         this->resynchronizeTimer_.setTimer(rnd() * MAX_RESYNCHRONIZE_TIME, false, this, createExecutor(createFunctor(&MovableEntity::resynchronize)));
     100        this->resynchronizeTimer_.setTimer(rnd() * MAX_RESYNCHRONIZE_TIME, false, createExecutor(createFunctor(&MovableEntity::resynchronize, this)));
    101101    }
    102102
     
    110110        {
    111111            // Resynchronise every few seconds because we only work with velocities (no positions)
    112             continuousResynchroTimer_ = new Timer<MovableEntity>(CONTINUOUS_SYNCHRONIZATION_TIME + rnd(-1, 1),
    113                 true, this, createExecutor(createFunctor(&MovableEntity::resynchronize)), false);
     112            continuousResynchroTimer_ = new Timer(CONTINUOUS_SYNCHRONIZATION_TIME + rnd(-1, 1),
     113                true, createExecutor(createFunctor(&MovableEntity::resynchronize, this)), false);
    114114        }
    115115
  • code/branches/core5/src/orxonox/worldentities/MovableEntity.h

    r5738 r5831  
    9696            Quaternion overwrite_orientation_;
    9797
    98             Timer<MovableEntity> resynchronizeTimer_;
    99             Timer<MovableEntity>* continuousResynchroTimer_;
     98            Timer resynchronizeTimer_;
     99            Timer* continuousResynchroTimer_;
    100100
    101101            Pawn* owner_;
Note: See TracChangeset for help on using the changeset viewer.