Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 20, 2017, 2:00:56 PM (8 years ago)
Author:
pascscha
Message:

skybox

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxShip.cc

    r11565 r11566  
    6969        SUPER(FlappyOrxShip, tick, dt);
    7070        //Execute movement
    71         if (this->hasLocalController()&&not isDead)
     71        if (this->hasLocalController())
    7272        {
    7373            if(getHealth()<0){
     
    8181           
    8282
    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;
    8892            }
    89 
    90             pos += Vector3(speed + velocity.x, 0, velocity.y) * dt;
    9193           
    92 
    93            
     94                       
    9495            // Camera
    9596            Camera* camera = this->getCamera();
     
    154155    void FlappyOrxShip::death()
    155156    {
     157        isDead = true;
    156158        Vector3 pos = getPosition();
    157159        pos.x = 0;
Note: See TracChangeset for help on using the changeset viewer.