Changeset 12153 for code/branches
- Timestamp:
- Dec 5, 2018, 12:04:18 PM (6 years ago)
- Location:
- code/branches/TowerDefense_HS18
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/TowerDefense_HS18/data/levels/towerDefense.oxw
r12137 r12153 23 23 <TowerDefenseSelecter> 24 24 <camerapositions> 25 <CameraPosition position="-50,-1 200,1000" lookat="-50,0,-200" absolute=true drag=true mouselook=true/>25 <CameraPosition position="-50,-1300,1000" lookat="-50,0,-400" absolute=true drag=true mouselook=true/> 26 26 </camerapositions> 27 27 </TowerDefenseSelecter> … … 250 250 explosionchunks = 6 251 251 252 health = 30253 maxhealth = 30254 initialhealth = 30255 256 shieldhealth = 0257 initialshieldhealth = 0258 maxshieldhealth = 0252 health = 100 253 maxhealth = 10000000000000 254 initialhealth = 100 255 256 shieldhealth = 1000 257 initialshieldhealth = 1000 258 maxshieldhealth = 10000000000000 259 259 shieldabsorption = 0.8 260 260 shieldrechargerate = 1 … … 299 299 </engines> 300 300 <attached> 301 <Model position="0,0,0" yaw=180 pitch=0 roll=0 scale= 7.5mesh="finalenemy1.mesh" />301 <Model position="0,0,0" yaw=180 pitch=0 roll=0 scale=10 mesh="finalenemy1.mesh" /> 302 302 </attached> 303 303 <collisionShapes> … … 320 320 explosionchunks = 6 321 321 322 health = 30323 maxhealth = 30322 health = 40 323 maxhealth = 10000000000000 324 324 initialhealth = 30 325 325 … … 390 390 explosionchunks = 6 391 391 392 health = 30393 maxhealth = 30394 initialhealth = 30395 396 shieldhealth = 0397 initialshieldhealth = 0398 maxshieldhealth = 0392 health = 50 393 maxhealth = 10000000000000 394 initialhealth = 50 395 396 shieldhealth = 20 397 initialshieldhealth = 20 398 maxshieldhealth = 10000000000000 399 399 shieldabsorption = 0.8 400 400 shieldrechargerate = 1 … … 706 706 tower5Cost=100 707 707 fields="F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1 708 F1F1F1R1I1I1I1I1I1I1I1R0F1F1F1F1 708 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TowerDefense_HS18/src/modules/towerdefense/TowerDefense.cc
r12125 r12153 157 157 en1->addTemplate("enemytowerdefense1"); 158 158 en1->setScale(3); 159 en1->setHealth(en1->getHealth() + this->getWaveNumber()*4); 159 en1->setHealth(en1->getHealth() + this->getWaveNumber()*1/3*0.5*(en1->getHealth())); 160 en1->setShieldHealth(en1->getShieldHealth() + this->getWaveNumber()*1/3*0.5*(en1->getShieldHealth())); 160 161 break; 161 162 … … 163 164 en1->addTemplate("enemytowerdefense2"); 164 165 en1->setScale(2); 165 en1->setHealth(en1->getHealth() + this->getWaveNumber()* 4);166 en1->setHealth(en1->getHealth() + this->getWaveNumber()*1/3*0.3*(en1->getHealth())); 166 167 break; 167 168 … … 169 170 en1->addTemplate("enemytowerdefense3"); 170 171 en1->setScale(1); 171 en1->setHealth(en1->getHealth() + this->getWaveNumber()*4); 172 en1->setHealth(en1->getHealth() + this->getWaveNumber()*1/3*0.2*(en1->getHealth())); 173 en1->setShieldHealth(en1->getShieldHealth() + this->getWaveNumber()*1/3*0.5*(en1->getShieldHealth())); 172 174 break; 173 175 } … … 308 310 ctrl->destroy(); 309 311 it = enemies_.erase(it); 310 addCredit(1); 312 313 int currentType = this->getWaveNumber() % 3 + 1; 314 switch (currentType){ //Entscheidet, wie viele Credits vergeben werden sollen 315 case 1: //currently boss wave 316 addCredit(100); 317 if (this->getLifes() <= 90) 318 { 319 this->setLifes(this->getLifes() + 10); 320 } 321 break; 322 323 case 2: //currently mass wave 324 addCredit(5); 325 break; 326 327 case 3: //currently moderate wave 328 addCredit(10); 329 break; 330 } 311 331 } 312 332 else … … 340 360 timeSinceLastSpawn_ -= 1.0; 341 361 -- waveSize_; 342 addTowerDefenseEnemy(this->getWaveNumber() % 3 + 1); 362 addTowerDefenseEnemy(this->getWaveNumber() % 3 + 1); //Gegnertyp rotiert durch die 3 moeglichen, er beginnt bei Typ 2!!! 343 363 } 344 364 else if (timeUntilNextWave_ <= 0.0 && waveSize_ <= 0) 345 365 { 366 int currentType = this->getWaveNumber() % 3 + 1; 346 367 //New wave 347 368 ++ waveNumber_; … … 349 370 350 371 timeUntilNextWave_ = waveNumber_+20.0f; 351 waveSize_ = waveNumber_+5; 372 // Entscheidung, wie gross die einzelnen waves sein sollen. 373 switch (currentType){ 374 case 1: //currently boss wave 375 waveSize_ = waveNumber_+10; 376 break; 377 378 case 2: //currently mass wave 379 waveSize_ = (waveNumber_+10)/2; 380 break; 381 382 case 3: //currently moderate wave 383 waveSize_ = 1; 384 break; 385 } 352 386 } 353 387 … … 361 395 std::string fields = center_->getFields(); 362 396 int pos = 0; 363 for (int j = 15; j >= 0; --j) 364 { 365 for (int i = 0; i < 16; ++i)397 for (int j = 15; j >= 0; --j) //Vertical number of rows 398 { 399 for (int i = 0; i <= 15; ++i) //Horizontal number of rows 366 400 { 367 401 coord.Set(i,j); -
code/branches/TowerDefense_HS18/src/modules/towerdefense/TowerDefenseController.cc
r12137 r12153 81 81 Engine* engine = ship->getEngine(0); 82 82 if(engine != nullptr) { 83 speed = engine->getMaxSpeedFront(); //Geschwindigkeit wird ausgelesen84 orxout() << "shiftshan" << endl; 83 speed = engine->getMaxSpeedFront(); //Geschwindigkeit sollte ausgelesen werden, wird momentan aber noch NICHT -> ein Fehler mit den Engines 84 85 85 } else { 86 speed = 100; 87 orxout() << "shiftshannonen" << endl; 86 speed = 200; //Momentan wird hiermit die Geschwindigkeit ALLER Schiffe gesetzt! 88 87 } 89 88 … … 127 126 this->getControllableEntity()->setPosition(offset_ + newPosition); 128 127 this->getControllableEntity()->lookAt(this->getControllableEntity()->getPosition() + newDirection); 129 128 this->getControllableEntity()->setVelocity(speed * newDirection); 130 129 } 131 130
Note: See TracChangeset
for help on using the changeset viewer.