Changeset 9272 for code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseCenterpoint.cc
- Timestamp:
- Jun 3, 2012, 6:05:24 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseCenterpoint.cc
r9271 r9272 50 50 { 51 51 RegisterObject(TowerDefenseCenterpoint); 52 53 52 53 this->width_ = 15; 54 54 this->height_ = 15; 55 55 this->towerTemplate_ = ""; 56 56 57 57 //this->setCollisionType(Static); 58 58 59 59 this->checkGametype(); 60 60 61 61 } … … 71 71 XMLPortParam(TowerDefenseCenterpoint, "width", setWidth, getWidth, xmlelement, mode); 72 72 XMLPortParam(TowerDefenseCenterpoint, "height", setHeight, getHeight, xmlelement, mode); 73 73 XMLPortParam(TowerDefenseCenterpoint, "tileScale", setTileScale, getTileScale, xmlelement, mode); 74 74 XMLPortParam(TowerDefenseCenterpoint, "towerTemplate", setTowerTemplate, getTowerTemplate, xmlelement, mode); 75 75 76 76 //TODO: add XMLPortObject(TowerDefenseCenterpoint, WorldEntity, "waypoints", addWaypoint, getWaypoint, xmlelement, mode); 77 77 // This was copied and shightly modified from WaypointController.cc ; there are no getters and setters and no membervariable yet … … 100 100 void TowerDefenseCenterpoint::checkGametype() 101 101 { 102 102 if (this->getGametype() != NULL && this->getGametype()->isA(Class(TowerDefense))) 103 103 { 104 104 // Sets the centerpoint of the gametype. The gametype uses this to later spawn in towers, he needs the tower template stored in the center point 105 105 TowerDefense* towerDefenseGametype = orxonox_cast<TowerDefense*>(this->getGametype().get()); 106 106 towerDefenseGametype->setCenterpoint(this);
Note: See TracChangeset
for help on using the changeset viewer.