- Timestamp:
- Dec 11, 2017, 4:06:44 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2D.cc
r11645 r11660 21 21 * 22 22 * Author: 23 * Florian Zinggeler23 * Viviane Yang 24 24 * Co-authors: 25 25 * ... … … 27 27 */ 28 28 29 /*TODO: Punktesystem aufbauen -> in HUD anzeigen 30 Schwierigkeitsgrad mit jedem levelup erhöhen -> mehr Steine spawnen? 31 spawnStone Methode schreiben 32 templates für die drei Grössen von Asteroiden erstellen 29 33 30 34 31 /** 35 32 @file Asteroids2D.cc 36 33 @brief Implementation of the Asteroids2D class. 34 35 TODO: 36 - Implement a counting system for the score 37 - HUD can be improved (display health, points, level etc.) 38 - Projectiles still 37 39 */ 38 40 … … 62 64 this->center_ = nullptr; 63 65 this->setHUDTemplate("Asteroids2DHUD"); 64 levelupTimer.setTimer( 60.0f, true, createExecutor(createFunctor(&Asteroids2D::levelUp, this)));66 levelupTimer.setTimer(30.0f, true, createExecutor(createFunctor(&Asteroids2D::levelUp, this))); //level up every 30s 65 67 } 66 68 … … 92 94 93 95 94 // Nach jedem Level Up werden mehr Steine gespawnt -> abhängig vom Schwierigkeitsgrad96 //After level up -> spawn stones 95 97 for(int i = 0; i < level*2; i++){ 96 98 spawnStone(); … … 101 103 void Asteroids2D::tick(float dt) 102 104 { 103 //Do this only for the first tick, generate 5 stones forthe beginning105 //Do this only for the first tick, generate 5 stones in the beginning 104 106 if(this->firstTick_) 105 107 { … … 118 120 void Asteroids2D::spawnStone() 119 121 { 122 123 //stones are created with a size 120 124 Asteroids2DStone* newStone = new Asteroids2DStone(this->center_->getContext()); 121 125 newStone->setAsteroids2DPlayer(player); … … 158 162 }; 159 163 160 //Funktion wird als erstes im Level aufgerufen 164 //The first function that will be called 161 165 void Asteroids2D::start() 162 166 {
Note: See TracChangeset
for help on using the changeset viewer.