- Timestamp:
- Apr 20, 2019, 6:29:44 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/3DPacman_FS19/src/modules/pacman/PacmanRed.cc
r12316 r12317 82 82 //nextMove(this->getPlayerPos(), redPos); 83 83 84 int directionV = findPlayerTravDir (lastPlayerPassedPoint, this->getPlayerPos()); 85 84 86 85 87 if(this->actuelposition!=lastPlayerPassedPoint){ 86 //std::cout<<this->target_x<<" "<<this->target_z<<endl;87 std::cout<< redPos<<endl;88 89 std::cout<<this->getPlayerPos()<<endl; 88 90 std::cout<<this->lastPlayerPassedPoint<<endl; 89 //getShortestPath(Vector3(-215,10,-195),Vector3(70,10,-135)); 90 //getShortestPath(redPos, lastPlayerPassedPoint); 91 std::cout<<getPointInFrontOfPacman(lastPlayerPassedPoint, directionV)<<endl; 91 92 nextMove(redPos, lastPlayerPassedPoint); 92 } /*93 } 93 94 else{// red pacman is at lastPlayerPassedPoint 94 nextMove(this->getPlayerPos(), redPos);95 }*/96 95 97 //setNewTargetRed(Vector3(70,10,-85)); 98 //std::cout<<this->target_x<<" "<<target_z<<endl; 99 //std::cout<<"meuh"<<endl; 100 //std::cout<<this->actuelposition; 96 //int directionV = findPlayerTravDir (lastPlayerPassedPoint, this->getPlayerPos()); 97 98 Vector3 pointInFrontOfPlayer = getPointInFrontOfPacman(lastPlayerPassedPoint, directionV); 99 100 nextMove(redPos, pointInFrontOfPlayer); 101 102 //nextMove(this->getPlayerPos(), redPos); 103 } 104 101 105 102 106 lockmove=false; //NEVER FORGET THIS ONE !!!!!!!
Note: See TracChangeset
for help on using the changeset viewer.