- Timestamp:
- May 8, 2018, 1:20:49 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/3DPacman_FS18/src/modules/pacman/Pacman.cc
r11953 r11954 66 66 SUPER(Pacman, tick, dt); 67 67 68 if(!timer){ 68 //orxout() << timer << endl; 69 //orxout() << afraid << endl; 70 71 72 if(afraid){ 69 73 timer = timer - dt; 70 74 if(timer<=0){ 71 afraid = false; 72 this->setNormal(); 75 setNormal(); 73 76 } 74 77 } … … 105 108 106 109 for(PacmanPointAfraid* next : ObjectList<PacmanPointAfraid>()){ 107 if( collis(next->getPosition(),currentPosition)){110 if(next->taken(currentPosition)){ 108 111 setAfraid(); 109 112 } … … 155 158 156 159 //Change normal Ghosts with afraid ones 157 if(afraid){158 160 ghosts[4]->changewith(ghosts[0]); 159 161 ghosts[5]->changewith(ghosts[1]); 160 162 ghosts[6]->changewith(ghosts[2]); 161 163 ghosts[7]->changewith(ghosts[3]); 162 }163 164 164 165 afraid = false; … … 198 199 { 199 200 Deathmatch::start(); 201 202 int i = 0; 203 for(PacmanGhost* nextghost : ObjectList<PacmanGhost>()){ 204 if(3<i){ 205 nextghost->setPosition(0,-20,0); 206 nextghost->dontmove = true; 207 }; 208 209 i++; 210 } 200 211 } 201 212
Note: See TracChangeset
for help on using the changeset viewer.