Changeset 11862 for code/branches/3DPacman_FS18/src
- Timestamp:
- Apr 13, 2018, 1:08:46 PM (7 years ago)
- Location:
- code/branches/3DPacman_FS18/src/modules
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/3DPacman_FS18/src/modules/Pacman/3DPacman.cc
r11859 r11862 49 49 point = 0: 50 50 level = 1; 51 Vector3 startposplayer = Vector3(0,10,245); 51 52 52 53 } … … 70 71 } 71 72 72 i = 0:73 for(PacmanPointSphere* nextsphere : ObjectList<PacmanPointSphere>()){74 spheres[i] = nextsphere;75 i++;76 }77 78 73 player = this->getPlayer(); 79 74 if (player != nullptr) … … 90 85 } 91 86 87 i = 0; 88 for(PacmanPointSphere* nextsphere : ObjectList<PacmanPointSphere>()){ 89 if(collis(nextsphere.getPosition(), currentPosition)){ 90 takePoint(nextsphere); 91 } 92 } 93 92 94 SUPER(3DPacman, tick, dt); 93 95 94 96 } 95 96 97 97 98 … … 103 104 104 105 void 3DPacman::catched(){ 105 if( lives) this->end();106 if(!lives) this->end(); 106 107 --lives; 107 108 this->posreset(); … … 111 112 int i = 0; 112 113 for(PacmanGhost* nextghost : ObjectList<PacmanGhost>()){ 113 ghosts[i] = nextghost;114 nextghost.resetGhost(); 114 115 i++; 115 116 } 116 117 player.setPosition(startposplayer); 118 } 119 120 void 3DPacman::takePoint(PacmanPointSphere* taken){ 121 ++point; 122 if(point == totallevelpoint) this->levelUp; 123 124 Vector3 postaken = taken.getPosition(); 125 postaken.y = -50; 126 taken.setPosition(postaken); 117 127 } 118 128 … … 147 157 void 3DPacman::end() 148 158 { 149 // DON'T CALL THIS!150 // Deathmatch::end();151 // It will misteriously crash the game!152 // Instead startMainMenu, this won't crash.153 159 if (Highscore::exists()) 154 160 { -
code/branches/3DPacman_FS18/src/modules/Pacman/CMakeLists.txt
r11843 r11862 1 1 SET_SOURCE_FILES(PICKUP_SRC_FILES 2 2 PacmanGhost.cc 3 PacmanGelb.cc 3 4 ) 4 5 -
code/branches/3DPacman_FS18/src/modules/Pacman/PacmanGelb.h
r11859 r11862 36 36 37 37 38 #include " dodgerace/DodgeRacePrereqs.h"38 #include "Pacman/PacmanPrereqs.h" 39 39 40 40 #include "core/XMLPort.h" … … 44 44 namespace orxonox 45 45 { 46 class _Pacman GelbExport PacmanGelb : public SpaceShip46 class _PacmanExport PacmanGelb : public SpaceShip 47 47 { 48 48 public: … … 53 53 private: 54 54 Vector3 actuelposition; 55 btQuaternion actuelorient;55 Quaternion actuelorient; 56 56 57 } 57 }; 58 58 } 59 59 -
code/branches/3DPacman_FS18/src/modules/dodgerace/DodgeRaceShip.cc
r11071 r11862 106 106 107 107 setPosition(pos); 108 setOrientation(Vector3::UNIT_Y, Degree(270));108 //setOrientation(Vector3::UNIT_Y, Degree(270)); 109 109 110 110 // Level up!
Note: See TracChangeset
for help on using the changeset viewer.