Changeset 10124
- Timestamp:
- Nov 12, 2014, 4:11:00 PM (10 years ago)
- Location:
- code/branches/surfaceraceHS14/src/modules/dodgerace2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRace.cc
r10118 r10124 67 67 { 68 68 level++; 69 /*if (getPlayer() != NULL)69 if (getPlayer() != NULL) 70 70 { 71 71 for (int i = 0; i < 7; i++) … … 76 76 chunk->setScale(20); 77 77 } 78 } */78 } 79 79 addPoints(multiplier * 42); 80 80 multiplier *= 2; … … 119 119 } 120 120 } 121 121 */ 122 122 void DodgeRace::costLife() 123 123 { … … 128 128 // enemySpawnTimer.setTimer(30.0f, false, createExecutor(createFunctor(&DodgeRace::end, this))); 129 129 }; 130 */ 130 131 131 void DodgeRace::comboControll() 132 132 { … … 145 145 this->bForceSpawn_ = true; 146 146 147 /*if (this->center_ == NULL) // abandon mission!147 if (this->center_ == NULL) // abandon mission! 148 148 { 149 149 orxout(internal_error) << "DodgeRace: No Centerpoint specified." << endl; 150 150 GSLevel::startMainMenu(); 151 151 return; 152 } */152 } 153 153 // Call start for the parent class. 154 154 Deathmatch::start(); … … 162 162 } 163 163 } 164 /* 164 165 165 void DodgeRace::end() 166 166 { … … 170 170 // Instead startMainMenu, this won't crash. 171 171 GSLevel::startMainMenu(); 172 } */172 } 173 173 } -
code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRace.h
r10118 r10124 39 39 40 40 #include "DodgeRaceCenterPoint.h" // Necessary for WeakPointer?? 41 //#include "DodgeRaceShip.h" //DO NOT include in Header. Will cause forward declaration issues41 //#include "DodgeRaceShip.h" DO NOT include in Header. Will cause forward declaration issues 42 42 43 43 //#include "DodgeRaceHUDinfo.h" … … 72 72 73 73 virtual void start(); 74 //virtual void end();74 virtual void end(); 75 75 76 76 void levelUp(); … … 83 83 void setCenterpoint(DodgeRaceCenterPoint* center) 84 84 { this->center_ = center; } 85 virtual void addBots(unsigned int amount){} //<! overwrite function in order to bypass the addbots command 85 86 86 87 // checks if multiplier should be reset. 87 88 void comboControll(); 89 void costLife(); 88 90 89 91 bool bEndGame; … … 108 110 109 111 110 /* virtual void addBots(unsigned int amount){} //<! overwrite function in order to bypass the addbots command112 /* 111 113 112 114 //void spawnEnemy(); … … 116 118 117 119 118 void costLife(); 120 119 121 120 122 -
code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceHUDinfo.cc
r10118 r10124 39 39 { 40 40 RegisterObject(DodgeRaceHUDinfo); 41 /* 41 42 42 this->DodgeRaceGame = 0; 43 43 this->bShowLives_ = false; 44 44 this->bShowLevel_ = false; 45 45 this->bShowPoints_ = false; 46 this->bShowMultiplier_ = false; */46 this->bShowMultiplier_ = false; 47 47 } 48 48 /* -
code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceHUDinfo.h
r10118 r10124 43 43 public: 44 44 DodgeRaceHUDinfo(Context* context); 45 /* 46 virtual void tick(float dt);47 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);48 virtual void changedOwner();45 46 // virtual void tick(float dt); 47 // virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 48 //virtual void changedOwner(); 49 49 50 50 inline void setShowLives(bool value) … … 74 74 bool bShowLevel_; 75 75 bool bShowPoints_; 76 bool bShowMultiplier_; */76 bool bShowMultiplier_; 77 77 }; 78 78 } -
code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceShip.cc
r10118 r10124 46 46 damping = 10; 47 47 48 // not sure if has to be zero? 48 49 lastTimeFront = 0; 49 50 lastTimeLeft = 0; … … 106 107 setPosition(pos); 107 108 setOrientation(Vector3::UNIT_Y, Degree(270)); 108 /* 109 109 110 // Level up! 110 111 if (pos.x > 42000) … … 113 114 setPosition(Vector3(0, 0, pos.z)); // pos - Vector3(30000, 0, 0) 114 115 } 115 */ 116 116 117 SUPER(DodgeRaceShip, tick, dt); 117 118 } … … 183 184 return game; 184 185 } 185 /* 186 186 187 void DodgeRaceShip::death() 187 188 { 188 189 getGame()->costLife(); 189 190 SpaceShip::death(); 190 } */191 } 191 192 } -
code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceShip.h
r10118 r10124 75 75 bool isFireing; 76 76 77 protected: 78 virtual void death(); 79 77 80 private: 78 81 WeakPtr<DodgeRace> getGame(); 79 82 WeakPtr<DodgeRace> game; 83 WeakPtr<Projectile> lastShot; 80 84 Camera* camera; 81 85 float lastTimeFront, lastTimeLeft, lastTime; … … 90 94 91 95 /* 92 93 94 //virtual inline bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint); 95 96 protected: 97 virtual void death(); 96 virtual inline bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint); 98 97 99 98 private: 100 99 101 102 103 104 105 106 107 // WeakPtr<DodgeRaceEnemy> lastEnemy; 108 WeakPtr<Projectile> lastShot;*/ 100 WeakPtr<DodgeRaceEnemy> lastEnemy; 101 */ 109 102 110 103 };
Note: See TracChangeset
for help on using the changeset viewer.