Changeset 7852 for code/trunk/src
- Timestamp:
- Feb 10, 2011, 11:46:07 PM (14 years ago)
- Location:
- code/trunk/src/modules/pong
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/pong/Pong.h
r5929 r7852 59 59 void startBall(); 60 60 61 PongCenterpoint*center_;62 PongBall*ball_;63 PongBat*bat_[2];61 WeakPtr<PongCenterpoint> center_; 62 WeakPtr<PongBall> ball_; 63 WeakPtr<PongBat> bat_[2]; 64 64 Timer starttimer_; 65 65 }; -
code/trunk/src/modules/pong/PongBall.cc
r6417 r7852 165 165 } 166 166 167 void PongBall::setBats( PongBat** bats)167 void PongBall::setBats(WeakPtr<PongBat>* bats) 168 168 { 169 169 this->bat_ = bats; … … 175 175 { 176 176 if (!this->bat_) 177 this->bat_ = new PongBat*[2];177 this->bat_ = new WeakPtr<PongBat>[2]; // TODO: delete this somewhere 178 178 if (this->batID_[0] != OBJECTID_UNKNOWN) 179 179 this->bat_[0] = orxonox_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[0])); -
code/trunk/src/modules/pong/PongBall.h
r7163 r7852 66 66 { return this->batlength_; } 67 67 68 void setBats( PongBat** bats);68 void setBats(WeakPtr<PongBat>* bats); 69 69 void applyBats(); 70 70 … … 79 79 float accelerationFactor_; 80 80 float batlength_; 81 PongBat** bat_;81 WeakPtr<PongBat>* bat_; 82 82 unsigned int* batID_; 83 83 float relMercyOffset_;
Note: See TracChangeset
for help on using the changeset viewer.