Changeset 12259 for code/branches/3DPacman_FS19/src
- Timestamp:
- Mar 28, 2019, 3:47:15 PM (6 years ago)
- Location:
- code/branches/3DPacman_FS19/src/modules/pacman
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/3DPacman_FS19/src/modules/pacman/PacmanGhost.cc
r12252 r12259 119 119 if(!(abs(this->actuelposition.z-target_z)<0.5)) { 120 120 velocity = Vector3(0,0,-sgn(this->actuelposition.z-this->target_z)); 121 move(dt, actuelposition, velocity);121 move(dt, actuelposition, newGoal, velocity); 122 122 } 123 123 if(!(abs(this->actuelposition.x-target_x)<0.5)){ … … 126 126 } 127 127 } 128 129 else{ 130 while (lockmove){}; 131 lockmove=true; 132 133 if(this.colour=1){ 134 //calculate new goal 135 136 } 137 138 else if(this.colour=2){ 139 140 } 141 142 else if(this.colour=3){ 143 144 } 145 146 else if(this.colour=4){ 147 148 } 149 150 getShortestPath(actuelposition, goal_x, goal_z) 151 //setnewTarget 152 } 153 /* 128 154 //Check on which position the ghost has arrived and set new target 129 155 else{ … … 338 364 lockmove = false; 339 365 } 340 366 */ 341 367 } 342 368 -
code/branches/3DPacman_FS19/src/modules/pacman/PacmanGhost.h
r12252 r12259 73 73 Vector3 actuelposition; 74 74 bool ismoving = false; 75 int target_x = 0; 75 int target_x = 0; // next step 76 76 int target_z = 0; 77 int goal_x = 0; // faraway goal to dertmine the direction of the target 78 int goal_z =0; 79 77 80 bool lockmove = false; 78 81 int colour=0;
Note: See TracChangeset
for help on using the changeset viewer.