Changeset 10325 for code/branches/towerdefenseFS15/src/modules/towerdefense
- Timestamp:
- Mar 19, 2015, 3:59:26 PM (10 years ago)
- Location:
- code/branches/towerdefenseFS15/src/modules/towerdefense
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefense.cc
r10319 r10325 154 154 //set initial credits, lifes and WaveNumber 155 155 this->setCredit(1000); 156 this->setLifes( 50);156 this->setLifes(25); 157 157 this->setWaveNumber(0); 158 158 time=0.0; … … 278 278 //Creates tower 279 279 TowerDefenseTower* towernew = new TowerDefenseTower(this->center_->getContext()); 280 towernew->addTemplate("towerturret");281 280 towernew->setPosition(static_cast<float>((x-8) * tileScale), static_cast<float>((y-8) * tileScale), 75); 282 281 towernew->setGame(this); -
code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefenseCenterpoint.cc
r9667 r10325 53 53 this->width_ = 15; 54 54 this->height_ = 15; 55 this->towerTemplate_ = "";56 55 57 56 //this->setCollisionType(Static); … … 72 71 XMLPortParam(TowerDefenseCenterpoint, "height", setHeight, getHeight, xmlelement, mode); 73 72 XMLPortParam(TowerDefenseCenterpoint, "tileScale", setTileScale, getTileScale, xmlelement, mode); 74 XMLPortParam(TowerDefenseCenterpoint, "towerTemplate", setTowerTemplate, getTowerTemplate, xmlelement, mode);75 73 76 74 //TODO: add XMLPortObject(TowerDefenseCenterpoint, WorldEntity, "waypoints", addWaypoint, getWaypoint, xmlelement, mode); -
code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefenseCenterpoint.h
r9667 r10325 79 79 { return this->tileScale_; } 80 80 81 /**82 @brief Set the template for the towers.83 @param template The template name to be applied to each tower.84 */85 void setTowerTemplate(const std::string& templateName)86 { this->towerTemplate_ = templateName; }87 88 const std::string& getTowerTemplate(void) const89 { return this->towerTemplate_; }90 91 81 private: 92 82 void checkGametype(); … … 95 85 unsigned int height_; 96 86 unsigned int tileScale_; 97 98 std::string towerTemplate_;99 87 }; 100 88 } -
code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefenseTower.cc
r10319 r10325 26 26 RegisterObject(TowerDefenseTower); 27 27 game_ =NULL; 28 this->setCollisionType(WorldEntity:: Dynamic);28 this->setCollisionType(WorldEntity::None); 29 29 upgrade = 0; 30 30 this->addTemplate("towerdefensetower"); 31 31 32 32 … … 70 70 setReloadRate(reloadrate); 71 71 setReloadWaitTime(reloadwaittime); 72 this->addTemplate("towerturret1");72 //this->addTemplate("towerturret1"); 73 73 } 74 74 else
Note: See TracChangeset
for help on using the changeset viewer.