Changeset 11566 for code/branches
- Timestamp:
- Nov 20, 2017, 2:00:56 PM (7 years ago)
- Location:
- code/branches/FlappyOrx_HS17
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FlappyOrx_HS17/data/levels/FlappyOrx.oxw
r11563 r11566 32 32 <Scene 33 33 ambientlight = "0.8, 0.7, 0.4" 34 skybox = "Orxonox/skyBox FlappyOrx"34 skybox = "Orxonox/skyBoxBasic" 35 35 > 36 36 -
code/branches/FlappyOrx_HS17/data/overlays/FlappyOrxHUD.oxo
r11563 r11566 29 29 /> 30 30 31 <OverlayText32 position = "0.02, 0.02"33 pickpoint = "0.0, 0.0"34 font = "ShareTechMono"35 textsize = 0.0436 colour = "1.0, 1.0, 1.0, 1.0"37 align = "left"38 caption = "Score: "39 />40 31 <!-- <FlappyOrxHUDinfo 41 32 position = "0.14, 0.01" -
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.cc
r11565 r11566 67 67 point = 0; 68 68 bShowLevel = false; 69 sDeathMessage = " hallihallo";69 sDeathMessage = "Welcome to FlappyOrx\nPress Space to start!"; 70 70 bIsDead = true; 71 71 multiplier = 1; -
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxHUDinfo.cc
r11565 r11566 68 68 if(not this->FlappyOrxGame->isDead()){ 69 69 if(this->bShowPoints_){ 70 const std::string& points = multi_cast<std::string>(this->FlappyOrxGame->getPoints());70 const std::string& points = "Score: "+multi_cast<std::string>(this->FlappyOrxGame->getPoints()); 71 71 setTextSize(0.04); 72 72 setPosition(Vector2(0.14, 0.02)); … … 79 79 } 80 80 else{ 81 if(this->bShowGameOver_){ 81 if(this->bShowPoints_){ 82 setTextSize(0); 83 } 84 else if(this->bShowGameOver_){ 82 85 std::string message = this->FlappyOrxGame->getDeathMessage(); 83 86 setTextSize(0.1); 84 87 setPosition(Vector2(.5, .5)); 88 89 setAlignment(OverlayText::Alignment::Center); 90 85 91 this->setCaption(message); 86 92 this->setColour(ColourValue(1, 0, 0, 1)); -
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxShip.cc
r11565 r11566 69 69 SUPER(FlappyOrxShip, tick, dt); 70 70 //Execute movement 71 if (this->hasLocalController() &¬ isDead)71 if (this->hasLocalController()) 72 72 { 73 73 if(getHealth()<0){ … … 81 81 82 82 83 velocity.y += gravity*dt; 84 if(isFlapping){ 85 isFlapping = false; 86 if(pos.z > -150) 87 velocity.y = -UpwardThrust; 83 if(not isDead){ 84 velocity.y += gravity*dt; 85 if(isFlapping){ 86 isFlapping = false; 87 if(pos.z > -150) 88 velocity.y = -UpwardThrust; 89 } 90 91 pos += Vector3(speed + velocity.x, 0, velocity.y) * dt; 88 92 } 89 90 pos += Vector3(speed + velocity.x, 0, velocity.y) * dt;91 93 92 93 94 94 95 // Camera 95 96 Camera* camera = this->getCamera(); … … 154 155 void FlappyOrxShip::death() 155 156 { 157 isDead = true; 156 158 Vector3 pos = getPosition(); 157 159 pos.x = 0;
Note: See TracChangeset
for help on using the changeset viewer.