Changeset 10125 for code/branches/towerdefenseHS14/src/modules/towerdefense
- Timestamp:
- Nov 12, 2014, 11:53:34 PM (10 years ago)
- Location:
- code/branches/towerdefenseHS14/src/modules/towerdefense
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/towerdefenseHS14/src/modules/towerdefense/TDCoordinate.cc
r10106 r10125 36 36 coord->x= (x-8) * tileScale; 37 37 coord->y= (y-8) * tileScale; 38 coord->z= 0;38 coord->z=100; 39 39 40 40 return *coord; -
code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefense.cc
r10123 r10125 148 148 149 149 TDCoordinate* coord1 = new TDCoordinate(1,1); 150 TDCoordinate* coord2 = new TDCoordinate(1, 1);151 TDCoordinate* coord3 = new TDCoordinate(1 ,2);150 TDCoordinate* coord2 = new TDCoordinate(1,3); 151 TDCoordinate* coord3 = new TDCoordinate(10,3); 152 152 153 153 … … 163 163 164 164 165 for(int i = 0 ; i < 20; ++i)165 for(int i = 0 ; i < 1 ; ++i) 166 166 { 167 167 addTowerDefenseEnemy(path); … … 175 175 } 176 176 177 // Generates a TowerDefenseEnemy. Uses Template "enemytowerdefense". Sets position at first waypoint of path. 178 177 179 void TowerDefense::addTowerDefenseEnemy(std::vector<TDCoordinate*> path){ 178 180 … … 180 182 181 183 TowerDefenseEnemy* en1 = new TowerDefenseEnemy(this->center_->getContext()); 182 en1->addTemplate("spaceshipassff"); 183 /*en1->setInitialHealth(1000); 184 en1->addTemplate("enemytowerdefense"); 185 en1->setScale(3); 186 187 188 /*en1->setInitialHealth(1000); 184 189 en1->setHealth(1000); 185 190 en1->setMaxHealth(1000); … … 190 195 191 196 192 Model* TowerDefenseEnemymodel = new Model(this->center_->getContext()); 193 194 TowerDefenseEnemymodel->setMeshSource("cube.mesh"); 195 196 TowerDefenseEnemymodel->setPosition(0,0,75); 197 en1->setPosition(0,0,150); 198 TowerDefenseEnemymodel->setScale(10); 199 200 201 en1->attach(TowerDefenseEnemymodel); 197 //Model* TowerDefenseEnemymodel = new Model(this->center_->getContext()); 198 199 //TowerDefenseEnemymodel->setMeshSource("cube.mesh"); 200 201 //TowerDefenseEnemymodel->setPosition(0,0,75); 202 en1->setPosition(path.at(0)->get3dcoordinate()); 203 204 //TowerDefenseEnemymodel->setScale(10); 205 206 207 //en1->attach(TowerDefenseEnemymodel); 202 208 203 209 TowerDefenseEnemyvector.push_back(en1);
Note: See TracChangeset
for help on using the changeset viewer.