Changeset 11624 for code/branches/FlappyOrx_HS17/src
- Timestamp:
- Dec 4, 2017, 2:38:03 PM (7 years ago)
- Location:
- code/branches/FlappyOrx_HS17/src/modules/flappyorx
- Files:
-
- 6 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FlappyOrx_HS17/src/modules/flappyorx/CMakeLists.txt
r11529 r11624 4 4 FlappyOrxCenterPoint.cc 5 5 FlappyOrxShip.cc 6 FlappyOrxWeapon.cc7 FlappyOrxWeaponEnemy.cc8 6 FlappyOrxHUDinfo.cc 9 FlappyOrxAsteroid.cc10 7 END_BUILD_UNIT 11 8 ) -
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.cc
r11620 r11624 21 21 * 22 22 * Author: 23 * Leo Me hr Holz23 * Leo Merholz 24 24 * Pascal Schärli 25 * Co-authors: 26 * ... 25 27 * 26 28 */ … … 47 49 48 50 #include "FlappyOrxCenterPoint.h" 49 #include "FlappyOrxAsteroid.h"50 51 #include "FlappyOrxShip.h" 51 52 … … 73 74 } 74 75 75 void FlappyOrx::XMLPort(Element& xmlelement, XMLPort::Mode mode)76 {77 SUPER(FlappyOrx, XMLPort, xmlelement, mode);78 XMLPortParam(FlappyOrx, "spawnDistance", setspawnDistance, getspawnDistance, xmlelement, mode);79 XMLPortParam(FlappyOrx, "Speed", setSpeed, getSpeed, xmlelement, mode);80 }81 82 76 void FlappyOrx::updatePlayerPos(int x){ 83 77 … … 287 281 void FlappyOrx::end() 288 282 { 289 // DON'T CALL THIS!290 // Deathmatch::end();291 // It will misteriously crash the game!292 // Instead startMainMenu, this won't crash.293 283 if (Highscore::exists()){ 294 284 int score = this->getPoints(); -
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.h
r11620 r11624 21 21 * 22 22 * Author: 23 * Leo Me hr Holz23 * Leo Merholz 24 24 * Pascal Schärli 25 * Co-authors: 26 * ... 25 27 * 26 28 */ … … 67 69 virtual void end() override; 68 70 virtual void death(); 69 virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command 70 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 71 72 void setspawnDistance( int spawnDistance) 73 {this->spawnDistance = spawnDistance; } 74 int getspawnDistance() 75 { return this->spawnDistance; } 76 inline void setSpeed( float speed ){ 77 orxout()<< speed<< endl; 78 this->speed = speed; } 79 inline float getSpeed( ) 80 { return this->speed; } 81 71 82 72 void updatePlayerPos(int x); 83 73 void createAsteroid(Circle &c); … … 159 149 "Well, that was a waste of time", 160 150 "You suck!", 161 "Maybe try SuperOrxoBros? That game is not as hard.", 162 "Here's a tip: Try not to fly into these grey thingies."}; 151 "Maybe try SuperOrxoBros. That game is not as hard.", 152 "Here's a tip: Try not to fly into these grey thingies.", 153 "We won't comment on that."}; 163 154 std::vector<std::string> DeathMessage30 = { 164 155 "Getting better!", … … 182 173 "Wow, we're really impressed", 183 174 "We will honor you!", 184 "Please do that again!", 185 "Take that golden medal! You've earned it"}; 175 "Please, please do that again!", 176 "Take that golden medal! You've earned it", 177 "We are completely speechless! That was magnificent"}; 186 178 187 179 -
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxCenterPoint.cc
r11503 r11624 21 21 * 22 22 * Author: 23 * Florian Zinggeler 23 * Leo Merholz 24 * Pascal Schärli 24 25 * Co-authors: 25 26 * ... -
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxCenterPoint.h
r11503 r11624 21 21 * 22 22 * Author: 23 * Florian Zinggeler 23 * Leo Merholz 24 * Pascal Schärli 24 25 * Co-authors: 25 26 * ... -
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxHUDinfo.cc
r11595 r11624 21 21 * 22 22 * Author: 23 * Florian Zinggeler 23 * Leo Merholz 24 * Pascal Schärli 24 25 * 26 * Co-authors: 27 * ... 25 28 */ 26 29 … … 84 87 if(messageID==3){ 85 88 setTextSize(0.05); 86 this->setCaption(" press space to start");89 this->setCaption("Press fire and then press space to start"); 87 90 } 88 91 } -
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxPrereqs.h
r11503 r11624 21 21 * 22 22 * Author: 23 * Florian Zinggeler 23 * Leo Merholz 24 * Pascal Schärli 24 25 * Co-authors: 25 26 * ... -
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxShip.cc
r11620 r11624 21 21 * 22 22 * Author: 23 * Florian Zinggeler 23 * FLeo Merholz 24 * Pascal Schärli 24 25 * Co-authors: 25 26 * ... … … 52 53 deathTime = 0; 53 54 54 particleLifespan = 0. 1;55 particleLifespan = 0.08; 55 56 particleAge = 0; 56 57 … … 119 120 if (camera != nullptr) 120 121 { 121 //camera->setPosition(Vector3(-pos.z, -pos.y, 0));122 122 camera->setPosition(pos.x,-100,0); 123 123 camera->setOrientation(Vector3::UNIT_Z, Degree(0)); … … 138 138 139 139 int FlappyOrxShip::timeUntilRespawn(){ 140 return 2-time(0)+deathTime;140 return 1-time(0)+deathTime; 141 141 } 142 142 … … 154 154 } 155 155 156 // void FlappyOrxShip::rotateRoll(const Vector2& value) 157 // { 158 // if (getGame()) 159 // if (getGame()->bEndGame) 160 // getGame()->end(); 161 // } 162 156 163 157 FlappyOrx* FlappyOrxShip::getGame() 164 158 { … … 177 171 deathTime = time(0); 178 172 179 orxout()<<"death time: "<<deathTime<<std::endl;173 //orxout()<<"death time: "<<deathTime<<std::endl; 180 174 Vector3 pos = getPosition(); 181 175 pos.x = 0; -
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxShip.h
r11620 r11624 21 21 * 22 22 * Author: 23 * Florian Zinggeler 23 * Leo Merholz 24 * Pascal Schärli 24 25 * Co-authors: 25 26 * ... … … 56 57 57 58 //return to main menu if game has ended. 58 virtual void rotateRoll(const Vector2& value) override;59 59 60 inline void setSpeedBase( int speedBase){ getGame()->setSpeedBase(speedBase);}60 inline void setSpeedBase(float speedBase){ getGame()->setSpeedBase(speedBase);} 61 61 inline float getSpeedBase(){ return getGame()->getSpeedBase();} 62 62 inline void setSpeedIncrease(int speedIncrease){ getGame()->setSpeedIncrease(speedIncrease);}
Note: See TracChangeset
for help on using the changeset viewer.