- Timestamp:
- Dec 13, 2017, 9:21:25 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2D.cc
r11660 r11668 36 36 - Implement a counting system for the score 37 37 - HUD can be improved (display health, points, level etc.) 38 - Projectiles still 38 - Projectiles still fly in a mysterious direction 39 - Problem: The asteroids spawn randomly on the playing field. 40 During spawn or level up, there is the possibility that they pawn at the position of the ship. 41 ->spawn somewhere with a safty distance/radius 42 39 43 */ 40 44 … … 54 58 55 59 bEndGame = false; 56 lives = 1000;60 lives = 3; 57 61 level = 1; 58 62 point = 0; … … 75 79 { 76 80 77 // kann schoener gemacht werden81 //Do something that indicates a level up 78 82 for (int i = 0; i < 7; i++) 79 83 { … … 94 98 95 99 96 //After level up -> spawn stones 100 //After level up -> spawn stones. Modify for different difficulty level 97 101 for(int i = 0; i < level*2; i++){ 98 102 spawnStone(); … … 111 115 spawnStone(); 112 116 } 113 117 //after first tick, firstTick_ will remain false 114 118 this->firstTick_ = false; 115 119 } … … 121 125 { 122 126 123 //stones are created with a size 127 //stones are created with a size -> second constructor in Asteroids2DStone class 124 128 Asteroids2DStone* newStone = new Asteroids2DStone(this->center_->getContext()); 125 129 newStone->setAsteroids2DPlayer(player); 126 130 131 //look at templates in data/levels/templates/asteroidsAsteroids2D.oxt 127 132 switch(newStone->getSize()){ 128 133 case 1: … … 165 170 void Asteroids2D::start() 166 171 { 167 orxout() << "start" << endl;172 //orxout() << "start" << endl; 168 173 169 174 // Set variable to temporarily force the player to spawn. … … 188 193 } 189 194 190 // wird gerufen, falls man einen Asteroiden trifft->Aufruf durch Schiffklasse195 //This function will be called from the ship or the stone class (if the stone was hit) 191 196 void Asteroids2D::addPoints(int numPoints) 192 197 {
Note: See TracChangeset
for help on using the changeset viewer.