- Timestamp:
- Nov 20, 2017, 2:00:56 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.