- Timestamp:
- May 2, 2019, 4:40:50 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
r12336 r12337 64 64 Constructor. Registers and initializes the object. 65 65 */ 66 OrxoBlox::OrxoBlox(Context* context) : Deathmatch(context)66 OrxoBlox::OrxoBlox(Context* context) : ::orxonox::Deathmatch::Deathmatch(context) 67 67 { 68 68 RegisterObject(OrxoBlox); … … 154 154 this->createWall(); 155 155 156 //Create Ship 157 //this->ship_ = new OrxoBloxShip(this->center_->getContext()); 158 //this->ship_->setPosition(0, 0, 0); 159 156 160 } 157 161 else // If no centerpoint was specified, an error is thrown and the level is exited. … … 166 170 167 171 // Set variable to temporarily force the player to spawn. 168 this->bForceSpawn_ = false;172 this->bForceSpawn_ = true; 169 173 170 174 // Call start for the parent class. … … 186 190 } 187 191 188 /** 189 @brief 190 Spawns the input player. 191 @param player 192 The player to be spawned. 193 */ 192 OrxoBloxShip* OrxoBlox::getPlayer() 193 { 194 if (playership == nullptr) 195 { 196 for (OrxoBloxShip* ship_ : ObjectList<OrxoBloxShip>()) 197 { 198 playership = ship_; 199 } 200 } 201 return playership; 202 } 203 194 204 void OrxoBlox::spawnPlayer(PlayerInfo* player) 195 205 { 196 206 assert(player); 197 207 198 208 if(this->player_ == nullptr) … … 201 211 this->players_[player].state_ = PlayerState::Alive; 202 212 } 203 } 204 205 206 OrxoBloxShip* OrxoBlox::getPlayer() 207 { 208 for (OrxoBloxShip* ship : ObjectList<OrxoBloxShip>()) 209 { 210 return ship; 211 } 212 return nullptr; 213 213 214 } 214 215 215 216 //void startWall(void); 216 217 217 void OrxoBlox::LevelUp(){ 218 218 level_++;
Note: See TracChangeset
for help on using the changeset viewer.