- Timestamp:
- Nov 27, 2017, 2:03:45 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxShip.cc
r11576 r11595 40 40 #include "weapons/projectiles/Projectile.h" 41 41 #include <math.h> 42 #include <ctime> 42 43 43 44 namespace orxonox … … 53 54 this->gravity = 1; 54 55 isDead = true; 56 deathTime = 0; 55 57 56 58 } … … 128 130 void FlappyOrxShip::moveRightLeft(const Vector2& value){} 129 131 132 int FlappyOrxShip::timeUntilRespawn(){ 133 return 2-time(0)+deathTime; 134 } 135 130 136 void FlappyOrxShip::boost(bool boost){ 131 if(isDead){ 137 138 139 if(isDead&&timeUntilRespawn()<=0){ 132 140 isDead = false; 133 141 getGame()->setDead(false); … … 156 164 { 157 165 isDead = true; 166 167 deathTime = time(0); 168 169 orxout()<<"death time: "<<deathTime<<std::endl; 158 170 Vector3 pos = getPosition(); 159 171 pos.x = 0;
Note: See TracChangeset
for help on using the changeset viewer.