- Timestamp:
- Nov 27, 2017, 3:29:03 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.cc
r11598 r11600 37 37 #include "core/command/Executor.h" 38 38 #include "core/config/ConfigValueIncludes.h" 39 39 #include "core/XMLPort.h" 40 40 #include "gamestates/GSLevel.h" 41 41 #include "chat/ChatManager.h" … … 63 63 bIsDead = true; 64 64 firstGame = true; //needed for the HUD 65 66 spawnDistance= 200; //distance between tubes65 speed = 0; 66 spawnDistance=300; //distance between tubes 67 67 tubeOffsetX=500; //tube offset (so that we can't see them spawn) 68 68 … … 70 70 setHUDTemplate("FlappyOrxHUD"); 71 71 } 72 72 73 void FlappyOrx::XMLPort(Element& xmlelement, XMLPort::Mode mode) 74 { 75 SUPER(FlappyOrx, XMLPort, xmlelement, mode); 76 XMLPortParam(FlappyOrx, "spawnDistance", setspawnDistance, getspawnDistance, xmlelement, mode); 77 XMLPortParam(FlappyOrx, "Speed", setSpeed, getSpeed, xmlelement, mode); 78 } 73 79 74 80 void FlappyOrx::updatePlayerPos(int x){ … … 95 101 void FlappyOrx::levelUp(){ 96 102 point++; 97 spawnDistance = 300-3*point; //smaller spawn Distance98 getPlayer()->setSpeed( 100+.5*point); //increase speed103 spawnDistance = spawnDistance-3*point; //smaller spawn Distance 104 getPlayer()->setSpeed(this->speed+.5*point); //increase speed 99 105 } 100 106
Note: See TracChangeset
for help on using the changeset viewer.