Changeset 12268
- Timestamp:
- Apr 4, 2019, 2:40:29 PM (6 years ago)
- Location:
- code/branches/OrxoBlox_FS19
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoBlox_FS19/data/levels/orxoblox.oxw
r12265 r12268 9 9 include("HUDTemplates3.oxo") 10 10 include("stats.oxo") 11 include(" pongHUD.oxo")11 include("OrxoBloxHUD.oxo") 12 12 include("templates/lodInformation.oxt") 13 13 ?> 14 14 15 <Template name= pongbatcameras defaults=0>16 < PongBat>15 <Template name=OrxoBloxbatcameras defaults=0> 16 <OrxoBloxBat> 17 17 <camerapositions> 18 18 <CameraPosition position="0,150,0" pitch=-90 absolute=true /> … … 21 21 <CameraPosition position="0,30, 90" drag=true mouselook=true /> 22 22 </camerapositions> 23 </ PongBat>23 </OrxoBloxBat> 24 24 </Template> 25 25 26 <Template name= pongbat>27 < PongBat camerapositiontemplate=pongbatcameras>26 <Template name=OrxoBloxbat> 27 <OrxoBloxBat camerapositiontemplate=OrxoBloxbatcameras> 28 28 <attached> 29 29 <Model position="0,0,3" mesh="cube.mesh" scale3D="14,2,2" /> 30 <!--Model roll=180 mesh=" pongbat.mesh" scale=0.045 /-->30 <!--Model roll=180 mesh="OrxoBloxbat.mesh" scale=0.045 /--> 31 31 </attached> 32 </ PongBat>32 </OrxoBloxBat> 33 33 </Template> 34 34 35 <Template name= pongball>36 < PongBall35 <Template name=OrxoBloxball> 36 <OrxoBloxBall 37 37 defScoreSound = "sounds/PlayerWinScore_cut.ogg" 38 38 defBatSound = "sounds/Button.ogg" … … 48 48 <EventTarget target=hiteffect /> 49 49 </eventlisteners> 50 </ PongBall>50 </OrxoBloxBall> 51 51 </Template> 52 52 … … 55 55 <Level 56 56 plugins = "OrxoBlox_FS19" 57 gametype = " OrxoBlox"57 gametype = "Pong" 58 58 > 59 59 … … 64 64 65 65 <WorldAmbientSound source="Ganymede.ogg" looping="true" playOnLoad="true"/> 66 < PongBot />66 <OrxoBloxBot /> 67 67 68 68 <Scene … … 76 76 <MovableEntity rotationrate=5 rotationaxis="0,0,1"> 77 77 <attached> 78 < PongCenterpoint name=pongcenter dimension="200,120" balltemplate=pongball battemplate=pongbat ballspeed=200 ballaccfactor=1.0 batspeed=130 batlength=0.25>78 <OrxoBloxCenterpoint name=OrxoBloxcenter dimension="200,120" balltemplate=OrxoBloxball battemplate=OrxoBloxbat ballspeed=200 ballaccfactor=1.0 batspeed=130 batlength=0.25> 79 79 <attached> 80 80 <Model position="0,0,60" mesh="cube.mesh" scale3D="105,1,1" /> … … 97 97 <ParticleSpawner name=scoreeffect_left position="-120,0,-45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 /> 98 98 99 <!-- TODO: Create a PongScore Sound and include it here.99 <!-- TODO: Create a OrxoBlox Score Sound and include it here. 100 100 This WorldSound works, but doesn't make sense, since it is played together with ambient/moodDependedDirectory/Ganymede.ogg --> 101 <!--WorldSound name="scoreSound" position="0,0,0" source="sounds/ PongScore_cut.ogg" >101 <!--WorldSound name="scoreSound" position="0,0,0" source="sounds/OrxoBloxScore_cut.ogg" > 102 102 <events> 103 103 <play> 104 <EventListener event= pongcenter />104 <EventListener event=OrxoBloxcenter /> 105 105 </play> 106 106 </events> … … 114 114 115 115 </attached> 116 </ PongCenterpoint>116 </OrxoBloxCenterpoint> 117 117 </attached> 118 118 </MovableEntity> … … 129 129 <EventName name=right /> 130 130 </names> 131 <EventListener event= pongcenter />131 <EventListener event=OrxoBloxcenter /> 132 132 </EventFilter> 133 133 </spawn> … … 145 145 <EventName name=left /> 146 146 </names> 147 <EventListener event= pongcenter />147 <EventListener event=OrxoBloxcenter /> 148 148 </EventFilter> 149 149 </spawn> -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/CMakeLists.txt
r12254 r12268 6 6 BallGun/BallProjectile.cc 7 7 OrxoBlox.cc 8 OrxoBloxAI.cc8 9 9 OrxoBloxBall.cc 10 10 OrxoBloxBat.cc -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
r12264 r12268 46 46 #include "OrxoBloxBat.h" 47 47 #include "OrxoBloxBot.h" 48 #include "OrxoBlox AI.h"48 #include "OrxoBloxStones.h" 49 49 50 50 namespace orxonox … … 75 75 76 76 // Set the type of Bots for this particular Gametype. 77 this->botclass_ = Class(OrxoBloxB ot);77 this->botclass_ = Class(OrxoBloxBat); 78 78 79 79 this->scoreLimit_ = 10; … … 193 193 void OrxoBlox::end() 194 194 { 195 ChatManager::message("You suck!!"); 195 196 this->cleanup(); 196 197 … … 233 234 else 234 235 return; 235 236 // If the player is an AI, it receives a pointer to the ball.237 if (player->getController() != nullptr && player->getController()->isA(Class(OrxoBloxAI)))238 {239 OrxoBloxAI* ai = orxonox_cast<OrxoBloxAI*>(player->getController());240 ai->setOrxoBloxBall(this->ball_);241 }242 236 } 243 237 … … 278 272 } 279 273 280 // If a player gets enough points, he won the game -> end of game281 PlayerInfo* winningPlayer = nullptr;282 if (this->getLeftPlayer() && this->getScore(this->getLeftPlayer()) >= scoreLimit_)283 winningPlayer = this->getLeftPlayer();284 285 if (winningPlayer)286 {287 ChatManager::message(winningPlayer->getName() + " has won!");288 this->end();289 }290 274 291 275 // Restart the timer to start the ball. … … 317 301 } 318 302 319 /**320 @brief321 Get the right player.322 @return323 Returns a pointer to the player playing on the right. If there is no right player, nullptr is returned.324 */325 303 326 304 } -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h
r12260 r12268 84 84 85 85 PlayerInfo* getLeftPlayer() const; //!< Get the left player. 86 PlayerInfo* getRightPlayer() const; //!< Get the right player.87 86 88 87 protected: -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxBot.cc
r12266 r12268 35 35 36 36 #include "core/CoreIncludes.h" 37 #include "OrxoBloxAI.h"38 37 39 38 namespace orxonox … … 49 48 RegisterObject(OrxoBloxBot); 50 49 51 this->defaultController_ = Class(OrxoBloxAI); 52 this->createController(); 50 53 51 } 54 52 }
Note: See TracChangeset
for help on using the changeset viewer.