- Timestamp:
- Apr 24, 2019, 10:38:07 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/3DPacman_FS19/src/modules/pacman/PacmanPink.cc
r12319 r12322 16 16 this->target_x=0; 17 17 this->target_z=15; 18 this->lastPlayerPassedPoint=Vector3( 70,10,-135);18 this->lastPlayerPassedPoint=Vector3(0,0,0); //Vector3(70,10,-135); 19 19 20 20 } … … 60 60 } 61 61 } 62 else if(this->lastPlayerPassedPoint==Vector3(0,0,0)){ 63 //as long as the player has not started the game, 64 //i.e. lastPlayerPastPoint is (0,0,0), pink pacman 65 //cannot possibly move, because it needs the position 66 //of the player to move accordingly 67 68 this->ismoving=false; 69 } 62 70 //Check on which position the ghost has arrived and set new target 63 71 else{ … … 67 75 Vector3 pinkPos=Vector3(this->target_x, 10, this->target_z); 68 76 77 std::cout<<this->lastPlayerPassedPoint<<endl; 78 69 79 int directionV = findPlayerTravDir (lastPlayerPassedPoint, this->getPlayerPos()); 70 80 this->pointInFrontOfPlayer=getPointInFrontOfPacman(lastPlayerPassedPoint, directionV); 71 81 72 82 std::cout<<this->pointInFrontOfPlayer<<endl; 73 83 nextMove(pinkPos, pointInFrontOfPlayer, lastPlayerPassedPoint); 74 84
Note: See TracChangeset
for help on using the changeset viewer.