* This function is called when one of the mission's UFOs is shot down (crashed or destroyed). * Currently the only thing that happens is delaying the next UFO in the mission sequence. * @param ufo The UFO that was shot down. * @param engine The game engine, unused for now. * @param globe The earth globe, unused for now. */
| 491 | * @param globe The earth globe, unused for now. |
| 492 | */ |
| 493 | void AlienMission::ufoShotDown(Ufo &ufo, Game &, const Globe &) |
| 494 | { |
| 495 | switch (ufo.getStatus()) |
| 496 | { |
| 497 | case Ufo::FLYING: |
| 498 | case Ufo::LANDED: |
| 499 | assert(0 && "Ufo seems ok!"); |
| 500 | break; |
| 501 | case Ufo::CRASHED: |
| 502 | case Ufo::DESTROYED: |
| 503 | if (_nextWave != _rule.getWaveCount()) |
| 504 | { |
| 505 | // Delay next wave |
| 506 | _spawnCountdown += 30 * (RNG::generate(0, 48) + 400); |
| 507 | } |
| 508 | break; |
| 509 | } |
| 510 | } |
| 511 | |
| 512 | /** |
| 513 | * This function is called when one of the mission's UFOs has finished it's time on the ground. |
no test coverage detected