Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 3, 2018, 3:45:20 PM (7 years ago)
Author:
dreherm
Message:

Afraid Ghosts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.cc

    r11931 r11933  
    417417
    418418    void PacmanGhost::move(float dt, Vector3 actuelposition, Vector3 velocity){
    419         this->setPosition(Vector3(actuelposition.x+20*velocity.x*dt,10,actuelposition.z+20*velocity.z*dt));
     419        if(!dontmove)
     420            this->setPosition(Vector3(actuelposition.x+20*velocity.x*dt,10,actuelposition.z+20*velocity.z*dt));
    420421    }
    421422
     
    423424       if((abs(one.x - other.x)<0.5) && (abs(one.z - other.z)<0.5)) return true;
    424425        return false;
     426    }
     427
     428    void changemovability(){
     429        if(dontmove){
     430         dontmove = false;}
     431        else{
     432         dontmove = true;   
     433        }
    425434    }
    426435
Note: See TracChangeset for help on using the changeset viewer.