Changeset 11931 for code/branches/3DPacman_FS18/src/modules/pacman
- Timestamp:
- May 3, 2018, 2:57:35 PM (7 years ago)
- Location:
- code/branches/3DPacman_FS18/src/modules/pacman
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/3DPacman_FS18/src/modules/pacman/Pacman.cc
r11915 r11931 44 44 RegisterObject(Pacman); 45 45 46 // firstGame = true; //needed for the HUD 46 47 lives = 10; 47 48 point = 0; 48 49 level = 1; 49 50 51 // setHUDTemplate("PacmanOrxHUD"); 52 // scoreboardTemplate_ = ""; 50 53 } 51 54 … … 97 100 98 101 bool Pacman::collis(Vector3 one, Vector3 other){ 99 if((abs(one.x-other.x)< 7) && (abs(one.y-other.y)<7) && (abs(one.z-other.z)<7))102 if((abs(one.x-other.x)<10) && (abs(one.y-other.y)<10) && (abs(one.z-other.z)<10)) 100 103 return true; 101 104 return false; … … 146 149 void Pacman::end() 147 150 { 151 /* 152 firstGame = false; 153 154 //Set randomized deathmessages 155 if(point<7) sDeathMessage = DeathMessage7[rand()%(DeathMessage7.size())]; 156 else if(point<20) sDeathMessage = DeathMessage20[rand()%(DeathMessage20.size())]; 157 else if(point<30) sDeathMessage = DeathMessage30[rand()%(DeathMessage30.size())]; 158 else sDeathMessage = DeathMessageover30[rand()%(DeathMessageover30.size())]; 159 160 //Update Highscore 161 if (Highscore::exists()) 162 { 163 int score = this->getPoints(); 164 Highscore::getInstance().storeScore("Pacman", score, this->getPlayer()->getPlayer()); 165 } 166 167 148 168 if (Highscore::exists()) 149 169 { … … 151 171 //Highscore::getInstance().storeScore("3DPacman", score, this->playerInfo_); 152 172 } 173 */ 153 174 GSLevel::startMainMenu(); 154 175 } -
code/branches/3DPacman_FS18/src/modules/pacman/Pacman.h
r11915 r11931 94 94 Vector3 startposplayer = Vector3(0,10,245); 95 95 int totallevelpoint = 3; 96 //bool firstGame; 96 97 97 98 private: … … 107 108 Timer showLevelTimer; 108 109 109 110 /* 111 112 //void spawnEnemy(); 113 114 115 116 117 118 119 120 121 122 123 124 125 private: 126 127 128 129 130 //Context* context; 131 */ 110 /* 111 std::string sDeathMessage; 112 const std::vector<std::string> DeathMessage7 = { 113 "You should really try that again", 114 "You can do better, can you?", 115 "Hey, maybe you get a participation award, that's good isn't it?", 116 "Congratulations, you get a medal, a wooden one", 117 "That was flappin bad!", 118 "Well, that was a waste of time", 119 "You suck!", 120 "Maybe try SuperOrxoBros. That game is not as hard.", 121 "Here's a tip: Try not to fly into these grey thingies.", 122 "We won't comment on that."}; 123 const std::vector<std::string> DeathMessage20 = { 124 "Getting better!", 125 "Training has paid off, huh?", 126 "Good average!", 127 "That was somehow enjoyable to watch", 128 "Flappin average", 129 "Getting closer to something", 130 "That wasn't crap, not bad", 131 "Surprisingly not bad."}; 132 */ 133 132 134 }; 133 135 } 134 136 135 #endif /* _ DodgeRace_H__ */137 #endif /* _Pacman_H__ */ -
code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.cc
r11927 r11931 49 49 50 50 this->setCollisionType(CollisionType::Dynamic); 51 52 this->resetposition = this->getPosition(); //Set Default start position53 51 54 52 this->actuelposition = this->getPosition(); … … 325 323 setnewTarget(56,64); 326 324 } 325 else if(findpos(actuelposition,possibleposition[66])){ 326 setnewTarget(47,48); 327 } 327 328 328 329 else{ -
code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.h
r11920 r11931 67 67 Vector3 actuelposition; 68 68 Vector3 velocity; 69 Vector3 resetposition ;69 Vector3 resetposition = Vector3(0,10,15); 70 70 }; 71 71
Note: See TracChangeset
for help on using the changeset viewer.