Changeset 11256 for code/branches/SpaceRace_HS16/src
- Timestamp:
- Oct 31, 2016, 4:01:40 PM (8 years ago)
- Location:
- code/branches/SpaceRace_HS16/src/modules/gametypes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/SpaceRace_HS16/src/modules/gametypes/OldSpaceRace.cc
r11246 r11256 33 33 #include "util/Convert.h" 34 34 #include "util/Math.h" 35 #include " SpaceRaceBot.h"35 #include "infos/Bot.h" 36 36 #include "items/Engine.h" 37 37 #include "controllers/HumanController.h" 38 #include "SpaceRaceBot.h" 39 40 #include "core/CoreIncludes.h" 41 #include "chat/ChatManager.h" 42 #include "infos/PlayerInfo.h" 43 #include "worldentities/pawns/Pawn.h" 44 #include "core/config/ConfigValueIncludes.h" 38 45 39 46 … … 43 50 RegisterUnloadableClass(OldSpaceRace); 44 51 52 45 53 OldSpaceRace::OldSpaceRace(Context* context) : Gametype(context) 46 54 { 47 55 RegisterObject(OldSpaceRace); 56 57 //this->botclass_ = Class(); 58 48 59 this->checkpointsReached_ = 0; 49 60 this->bTimeIsUp_ = false; 50 this->numberOfBots_ = 1; 61 this->setConfigValues(); 62 } 63 64 void OldSpaceRace::setConfigValues() 65 { 66 67 51 68 } 52 69 … … 127 144 } 128 145 146 147 void OldSpaceRace::playerEntered(PlayerInfo* player) 148 { 149 Gametype::playerEntered(player); 150 151 const std::string& message = player->getName() + " entered the game"; 152 ChatManager::message(message); 153 } 154 155 156 129 157 void OldSpaceRace::newCheckpointReached() 130 158 { -
code/branches/SpaceRace_HS16/src/modules/gametypes/OldSpaceRace.h
r11246 r11256 55 55 virtual ~OldSpaceRace() {} 56 56 57 void setConfigValues(); 58 57 59 virtual void start() override; 58 60 59 61 virtual void end() override; 60 62 61 63 virtual void playerEntered(PlayerInfo* player) override; 62 64 virtual void newCheckpointReached(); 63 65 virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command. 66 //<! This is only a temporary solution. Better: create racingBots. 67 68 64 69 virtual void countdownFinished(); 65 //<! This is only a temporary solution. Better: create racingBots.66 70 67 71 inline void setCheckpointsReached(int n) -
code/branches/SpaceRace_HS16/src/modules/gametypes/SpaceRaceBot.cc
r10262 r11256 36 36 this->createController(); 37 37 } 38 39 40 41 42 43 44 45 38 46 }
Note: See TracChangeset
for help on using the changeset viewer.