- Timestamp:
- May 3, 2018, 3:45:20 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/3DPacman_FS18/src/modules/pacman/Pacman.cc
r11931 r11933 96 96 } 97 97 98 for(PacmanPointAfraid* next : ObjectList<PacmanPointAfraid>()){ 99 if(collis(next->getPosition(), currentPosition)){ 100 setAfraid(); 101 } 102 } 103 98 104 } 99 105 … … 106 112 107 113 void Pacman::catched(){ 114 115 if(!afraid) { 108 116 if(!lives) this->end(); 109 117 --lives; 110 118 this->posreset(); 119 } 120 else{ 121 122 for(int nrghost = 0; nrghost<3; ++nrghost){ 123 bcolli = collis(ghosts[nrghost]->getPosition(), currentPosition); 124 if(bcolli) ghosts[nrghost]->resetGhost(); 125 bcolli = false; 126 } 127 } 128 } 129 130 void setAfraid(){ 131 afraid = true; 111 132 } 112 133
Note: See TracChangeset
for help on using the changeset viewer.