Changeset 12337
- Timestamp:
- May 2, 2019, 4:40:50 PM (6 years ago)
- Location:
- code/branches/OrxoBlox_FS19
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoBlox_FS19/data/levels/orxoblox.oxw
r12336 r12337 17 17 include("templates/spaceshipPirate.oxt") 18 18 include("templates/spaceshipOrxoBlox.oxt") 19 include("templates/enemyInvader.oxt")20 include("overlays/Asteroids2DHUD.oxo")21 include("templates/asteroidsAsteroids2D.oxt")22 19 ?> 23 20 -
code/branches/OrxoBlox_FS19/data/levels/templates/spaceshipOrxoBlox.oxt
r12315 r12337 1 <Template name=spaceshipOrx Blox>1 <Template name=spaceshipOrxoBlox> 2 2 <OrxoBloxShip 3 3 hudtemplate = spaceshiphud … … 43 43 > 44 44 <engines> 45 <MultiStateEngine position=" 7.6, 0, 6" template=spaceshipOrxoBlox dengine />46 <MultiStateEngine position="-7.6, 0, 0" template=spaceshipOrxoBlox dengine />45 <MultiStateEngine position=" 7.6, 0, 6" template=spaceshipOrxoBloxengine /> 46 <MultiStateEngine position="-7.6, 0, 0" template=spaceshipOrxoBloxengine /> 47 47 </engines> 48 48 <attached> … … 93 93 </Template> 94 94 95 <Template name=spaceship orxobloxdengine baseclass=MultiStateEngine>95 <Template name=spaceshipOrxoBloxengine baseclass=MultiStateEngine> 96 96 <MultiStateEngine 97 97 boostfactor = 2.2 -
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_++; -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h
r12331 r12337 43 43 #include "OrxoBloxCenterpoint.h" 44 44 #include "OrxoBloxWall.h" 45 #include "OrxoBloxShip.h" 45 46 46 47 namespace orxonox … … 72 73 virtual void end() override; ///!< Ends the OrxoBlox minigame. 73 74 74 virtual void spawnPlayer(PlayerInfo* player) override; //!< Spawns the input player.75 76 75 OrxoBloxShip* getPlayer(); 76 void spawnPlayer(PlayerInfo* Player) override; 77 77 78 78 void LevelUp(); … … 97 97 WeakPtr<OrxoBloxCenterpoint> center_; //!< The playing field. 98 98 WeakPtr<OrxoBloxBall> ball_; //!< The OrxoBlox ball. 99 unsigned int level_; 99 100 101 WeakPtr<OrxoBloxShip> playership; 100 102 PlayerInfo* player_; 101 unsigned int level_;102 103 103 Timer starttimer_; //!< A timer to delay the start of the game. 104 104 -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxBall.h
r12331 r12337 122 122 { return this->batlength_; } 123 123 124 125 void Bounce(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint); 124 126 125 127 virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override; 126 128 127 129 static const float MAX_REL_Z_VELOCITY; … … 133 135 void setDefBoundarySound(const std::string& engineSound); 134 136 const std::string& getDefBoundarySound(); 135 void Bounce(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint);136 virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;137 137 138 138 private: -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxShip.cc
r12298 r12337 34 34 35 35 #include "OrxoBloxShip.h" 36 #include "OrxoBloxShip.h"37 36 #include "core/CoreIncludes.h" 38 37 … … 48 47 this->width = 120; 49 48 this->height = 100; 49 orxout() << "Spawned" << std::endl; 50 50 51 51 //timer.setTimer(3.5f, true, createExecutor(createFunctor(&OrxoBloxShip::showorientation, this)));
Note: See TracChangeset
for help on using the changeset viewer.