Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 20, 2008, 1:47:41 AM (16 years ago)
Author:
landauf
Message:

added MovableEntity with network optimization for constant velocity and rotation

added new Timer feature to destroy a Timer right after it called the function

Location:
code/branches/objecthierarchy/src/orxonox/overlays/hud
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/overlays/hud/ChatOverlay.cc

    r1953 r1968  
    9090        COUT(0) << "Chat: " << text << std::endl;
    9191
    92         Timer<ChatOverlay>* timer = new Timer<ChatOverlay>;
    93         ExecutorMember<ChatOverlay>* executor = createExecutor(createFunctor(&ChatOverlay::dropMessage));
    94         executor->setDefaultValues(timer);
    95         timer->setTimer(this->displayTime_, false, this, executor);
     92        new Timer<ChatOverlay>(this->displayTime_, false, this, createExecutor(createFunctor(&ChatOverlay::dropMessage)), true);
    9693
    9794        this->updateOverlayText();
    9895    }
    9996
    100     void ChatOverlay::dropMessage(Timer<ChatOverlay>* timer)
     97    void ChatOverlay::dropMessage()
    10198    {
    10299        this->messages_.pop_front();
    103100        this->updateOverlayText();
    104 
    105         delete timer;
    106101    }
    107102
  • code/branches/objecthierarchy/src/orxonox/overlays/hud/ChatOverlay.h

    r1953 r1968  
    5454        private:
    5555            void updateOverlayText();
    56             void dropMessage(Timer<ChatOverlay>* timer);
     56            void dropMessage();
    5757
    5858            float displayTime_;
Note: See TracChangeset for help on using the changeset viewer.