- Timestamp:
- May 4, 2018, 11:22:50 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/3DPacman_FS18/src/modules/pacman/Pacman.cc
r11933 r11939 65 65 { 66 66 SUPER(Pacman, tick, dt); 67 68 if(!timer){ 69 timer = timer - dt; 70 if(timer<=0){ 71 afraid = false; 72 timer = 0; 73 } 74 } 67 75 68 76 int i = 0; … … 119 127 } 120 128 else{ 121 122 129 for(int nrghost = 0; nrghost<3; ++nrghost){ 123 130 bcolli = collis(ghosts[nrghost]->getPosition(), currentPosition); … … 130 137 void setAfraid(){ 131 138 afraid = true; 139 timer = 10; //Set timer to 10 seconds 132 140 } 133 141
Note: See TracChangeset
for help on using the changeset viewer.