- Timestamp:
- Nov 20, 2017, 1:35:53 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.cc
r11563 r11565 67 67 point = 0; 68 68 bShowLevel = false; 69 sDeathMessage = "hallihallo"; 70 bIsDead = true; 69 71 multiplier = 1; 70 72 b_combo = false; … … 77 79 78 80 if(this->tubes.size()==0||x-tubes.back()+tubeOffsetX>spawnDistance){ 79 orxout()<<"true: ";80 81 spawnTube(); 81 82 this->tubes.push(x+tubeOffsetX); 82 83 } 83 else{84 orxout()<<"false:";85 }86 orxout()<<"x("<<x<<")- tubes.back()("<<tubes.back()<<") + tubeOffsetX("<<tubeOffsetX<<") > spawnDistance("<<spawnDistance<<")"<<std::endl;87 84 if(this->tubes.size()!=0&&x>this->tubes.front()){ 88 85 this->tubes.pop(); … … 166 163 167 164 void FlappyOrx::createAsteroid(Circle &c){ 168 orxout() << "created Asteroid at x="<<c.x<<" y="<<c.y << std::endl;169 170 165 MovableEntity* newAsteroid = new MovableEntity(this->center_->getContext()); 171 166 … … 200 195 201 196 bool FlappyOrx::isDead(){ 202 return true;197 return bIsDead; 203 198 } 204 199 205 200 std::string FlappyOrx::getDeathMessage(){ 206 return "hello world";201 return sDeathMessage; 207 202 } 208 203 … … 241 236 242 237 void FlappyOrx::death(){ 238 bIsDead = true; 239 sDeathMessage = "GameOver"; 243 240 if (Highscore::exists()){ 244 241 int score = this->getPoints(); 245 242 if(score > Highscore::getInstance().getHighestScoreOfGame("Flappy Orx")) 246 243 Highscore::getInstance().storeHighscore("Flappy Orx",score); 247 248 244 } 249 245 point = -1;
Note: See TracChangeset
for help on using the changeset viewer.