Changeset 10325
- Timestamp:
- Mar 19, 2015, 3:59:26 PM (10 years ago)
- Location:
- code/branches/towerdefenseFS15
- Files:
-
- 1 added
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/towerdefenseFS15/data/levels/towerDefense.oxw
r10258 r10325 20 20 include("templates/spaceshipAssff.oxt") 21 21 include("templates/spaceshipPirate.oxt") 22 include("templates/tower .oxt")22 include("templates/towerdefensetower.oxt") 23 23 include("templates/enemytowerdefense.oxt") 24 24 include("templates/standardTurret.oxt") … … 42 42 </Pawn> 43 43 </Template> 44 45 46 <!-- Template for a tower EDIT: new towertemplate is included with "templates/tower" -->47 <!--Template name=towertemplate>48 <Tower>49 <attached>50 <Model position="0,0,0" scale=0.25 mesh="Tower_ME.mesh" />51 </attached>52 </Tower>53 </Template-->54 55 56 57 44 58 45 … … 114 101 height=16 115 102 tileScale=100 116 towerTemplate=tower117 103 position="0,0,0" 118 104 direction="0,0,0" -
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.