- Timestamp:
- May 24, 2009, 10:38:06 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/netp3/src/orxonox/objects/worldentities/PongBall.h
r2885 r3043 33 33 34 34 #include "objects/worldentities/MovableEntity.h" 35 #include "objects/worldentities/PongBat.h" 35 36 36 37 namespace orxonox … … 43 44 44 45 virtual void tick(float dt); 46 47 void registerVariables(); 45 48 46 49 void setFieldDimension(float width, float height) … … 61 64 62 65 void setBats(PongBat** bats) 63 { this->bat_ = bats; } 66 { this->bat_ = bats; this->batID_[0] = this->bat_[0]->getObjectID(); this->batID_[1] = this->bat_[1]->getObjectID(); } 67 68 void applyBats() 69 { if(!this->bat_) this->bat_ = new PongBat*[2]; if(this->batID_[0] != OBJECTID_UNKNOWN) this->bat_[0] = dynamic_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[0])); if(this->batID_[1] != OBJECTID_UNKNOWN) this->bat_[1] = dynamic_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[1])); } 64 70 65 71 static const float MAX_REL_Z_VELOCITY; … … 71 77 float batlength_; 72 78 PongBat** bat_; 79 unsigned int* batID_; 73 80 float relMercyOffset_; 74 81 };
Note: See TracChangeset
for help on using the changeset viewer.