Changeset 5831 for code/branches/core5/src/modules/pong
- Timestamp:
- Sep 28, 2009, 10:48:47 PM (16 years ago)
- Location:
- code/branches/core5/src/modules/pong
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/modules/pong/Pong.cc
r5806 r5831 52 52 this->setHUDTemplate("PongHUD"); 53 53 54 this->starttimer_.setTimer(1.0, false, this, createExecutor(createFunctor(&Pong::startBall)));54 this->starttimer_.setTimer(1.0, false, createExecutor(createFunctor(&Pong::startBall, this))); 55 55 this->starttimer_.stopTimer(); 56 56 -
code/branches/core5/src/modules/pong/Pong.h
r5738 r5831 62 62 PongBall* ball_; 63 63 PongBat* bat_[2]; 64 Timer <Pong>starttimer_;64 Timer starttimer_; 65 65 }; 66 66 } -
code/branches/core5/src/modules/pong/PongAI.cc
r5800 r5831 60 60 PongAI::~PongAI() 61 61 { 62 for (std::list<std::pair<Timer <PongAI>*, char> >::iterator it = this->reactionTimers_.begin(); it != this->reactionTimers_.end(); ++it)62 for (std::list<std::pair<Timer*, char> >::iterator it = this->reactionTimers_.begin(); it != this->reactionTimers_.end(); ++it) 63 63 (*it).first->destroy(); 64 64 } … … 231 231 232 232 // Add a new Timer 233 Timer <PongAI>* timer = new Timer<PongAI>(delay, false, this, createExecutor(createFunctor(&PongAI::delayedMove)));234 this->reactionTimers_.push_back(std::pair<Timer <PongAI>*, char>(timer, direction));233 Timer* timer = new Timer(delay, false, createExecutor(createFunctor(&PongAI::delayedMove, this))); 234 this->reactionTimers_.push_back(std::pair<Timer*, char>(timer, direction)); 235 235 } 236 236 else … … 246 246 247 247 // Destroy the timer and remove it from the list 248 Timer <PongAI>* timer = this->reactionTimers_.front().first;248 Timer* timer = this->reactionTimers_.front().first; 249 249 timer->destroy(); 250 250 -
code/branches/core5/src/modules/pong/PongAI.h
r5738 r5831 65 65 float strength_; 66 66 67 std::list<std::pair<Timer <PongAI>*, char> > reactionTimers_;67 std::list<std::pair<Timer*, char> > reactionTimers_; 68 68 char movement_; 69 69 char oldMove_;
Note: See TracChangeset
for help on using the changeset viewer.