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/graphics
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/orxonox/graphics/FadingBillboard.cc

    r5738 r5831  
    103103        {
    104104            this->changedirection_ = 1;
    105             this->turnonofftimer_.setTimer(this->turnontime_, false, this, createExecutor(createFunctor(&FadingBillboard::stopturnonoff)));
     105            this->turnonofftimer_.setTimer(this->turnontime_, false, createExecutor(createFunctor(&FadingBillboard::stopturnonoff, this)));
    106106
    107107            if (this->isVisible())
     
    111111        {
    112112            this->changedirection_ = -1;
    113             this->turnonofftimer_.setTimer(this->turnofftime_, false, this, createExecutor(createFunctor(&FadingBillboard::stopturnonoff)));
     113            this->turnonofftimer_.setTimer(this->turnofftime_, false, createExecutor(createFunctor(&FadingBillboard::stopturnonoff, this)));
    114114        }
    115115    }
     
    126126            this->fadedColour_ = ColourValue::ZERO;
    127127            this->getBillboardSet().setColour(this->fadedColour_);
    128             this->turnonofftimer_.setTimer(this->postprocessingtime_, false, this, createExecutor(createFunctor(&FadingBillboard::poststopturnonoff)));
     128            this->turnonofftimer_.setTimer(this->postprocessingtime_, false, createExecutor(createFunctor(&FadingBillboard::poststopturnonoff, this)));
    129129        }
    130130        this->changedirection_ = 0;
  • code/branches/core5/src/orxonox/graphics/FadingBillboard.h

    r5738 r5831  
    7474            float turnofftime_;
    7575            float postprocessingtime_;
    76             Timer<FadingBillboard> turnonofftimer_;
     76            Timer turnonofftimer_;
    7777            char changedirection_;
    7878            ColourValue fadedColour_;
  • code/branches/core5/src/orxonox/graphics/ParticleSpawner.cc

    r5801 r5831  
    9696            return;
    9797
    98         this->timer_.setTimer(this->startdelay_, false, this, createExecutor(createFunctor(&ParticleSpawner::fireParticleSpawner)));
     98        this->timer_.setTimer(this->startdelay_, false, createExecutor(createFunctor(&ParticleSpawner::fireParticleSpawner, this)));
    9999    }
    100100
     
    103103        this->setActive(true);
    104104        if (this->lifetime_ != 0)
    105             this->timer_.setTimer(this->lifetime_, false, this, createExecutor(createFunctor(&ParticleSpawner::stopParticleSpawner)));
     105            this->timer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&ParticleSpawner::stopParticleSpawner, this)));
    106106    }
    107107
     
    116116
    117117            if (!this->timer_.isActive() || this->timer_.getRemainingTime() > this->destroydelay_)
    118                 this->timer_.setTimer(this->destroydelay_, false, this, createExecutor(createFunctor(&ParticleSpawner::destroyParticleSpawner)));
     118                this->timer_.setTimer(this->destroydelay_, false, createExecutor(createFunctor(&ParticleSpawner::destroyParticleSpawner, this)));
    119119        }
    120120        else if (this->bLoop_)
    121121        {
    122             this->timer_.setTimer(this->destroydelay_, false, this, createExecutor(createFunctor(&ParticleSpawner::startParticleSpawner)));
     122            this->timer_.setTimer(this->destroydelay_, false, createExecutor(createFunctor(&ParticleSpawner::startParticleSpawner, this)));
    123123        }
    124124    }
  • code/branches/core5/src/orxonox/graphics/ParticleSpawner.h

    r5791 r5831  
    8989            void destroyParticleSpawner();
    9090
    91             Timer<ParticleSpawner> timer_;
     91            Timer timer_;
    9292
    9393            bool  bSuppressStart_;
Note: See TracChangeset for help on using the changeset viewer.