Changeset 8250 for code/branches/spacerace/src/modules
- Timestamp:
- Apr 18, 2011, 2:14:17 PM (14 years ago)
- Location:
- code/branches/spacerace/src/modules/gametypes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/spacerace/src/modules/gametypes/SpaceRace.cc
r8182 r8250 21 21 * 22 22 * Author: 23 * Aurelian Jaggi23 * Mauro Salomon 24 24 * Co-authors: 25 25 * ... … … 32 32 #include "network/Host.h" 33 33 34 namespace orxonox{ 34 namespace orxonox 35 { 35 36 CreateUnloadableFactory(SpaceRace); 36 37 … … 38 39 { 39 40 RegisterObject(SpaceRace); 40 this->numberOfCheckpoints_ = 0;41 41 this->checkpointsReached_ = 0; 42 42 this->numberOfBots_ = 0; -
code/branches/spacerace/src/modules/gametypes/SpaceRace.h
r8182 r8250 21 21 * 22 22 * Author: 23 * Aurelian Jaggi23 * Mauro Salomon 24 24 * Co-authors: 25 25 * ... … … 32 32 #include "gametypes/Gametype.h" 33 33 #include "gametypes/GametypesPrereqs.h" 34 #include " objects/triggers/DistanceTriggerBeacon.h"34 #include "RaceCheckPoint.h" 35 35 #include <boost/concept_check.hpp> 36 36 … … 45 45 virtual void tick(float dt); 46 46 47 virtual void start(); 48 virtual void end(); 47 inline void newCheckpointReached() 48 { this->checkpointsReached_++; } 49 inline void setCheckpointsReached(int n) 50 { this->checkpointsReached_ = n;} 51 inline int getCheckpointsReached() 52 { return this->checkpointsReached_; } 49 53 50 54 protected: 51 inline void newCheckpointReached() 52 { this->checkpointsReached++; } 53 inline bool lastCheckpointReached() 54 { return (this->checkpointsReached == this->numberOfCheckpoints); } 55 55 56 private: 56 int numberOfCheckpoints_;57 57 int checkpointsReached_; 58 59 58 }; 60 59 }
Note: See TracChangeset
for help on using the changeset viewer.