Changeset 12367
- Timestamp:
- May 16, 2019, 11:00:57 AM (6 years ago)
- Location:
- code/branches/OrxoBlox_FS19
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoBlox_FS19/data/levels/orxoblox.oxw
r12366 r12367 84 84 <!-- <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/> --> 85 85 <Light type=directional position="-100, 10000, -700" direction="0.2, -1, 0" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" /> 86 <SpawnPoint team=0 position="0,150,0" lookat="0,0,0" spawnclass= Asteroids2DShip/>86 <SpawnPoint team=0 position="0,150,0" lookat="0,0,0" spawnclass= OrxoBloxShip pawndesign=spaceshipOrxoBlox/> 87 87 88 88 <!--<Model mesh="axes.mesh" scale=10 position="0,0,0" /> --> -
code/branches/OrxoBlox_FS19/data/levels/templates/spaceshipOrxoBlox.oxt
r12337 r12367 6 6 spawnparticleduration = 3 7 7 explosionchunks = 4 8 9 health = 1010 maxhealth = 1011 initialhealth = 1012 13 shieldhealth = 2014 initialshieldhealth = 2015 maxshieldhealth = 2016 shieldabsorption = 0.117 shieldrechargerate = 118 shieldrechargewaittime = 119 8 20 9 primaryThrust = 150 … … 37 26 linearDamping = 0.9 38 27 angularDamping = 0.9999999 39 40 collisiondamage = 10041 enablecollisiondamage = true42 28 43 29 > … … 47 33 </engines> 48 34 <attached> 49 <Model position="0,0,0" yaw=90 pitch=0 roll=0 scale=4mesh="escortShip.mesh" />50 <Model position="0,0,0" yaw=180 pitch=90 roll=0 scale=4mesh="escortWeapon.mesh" />35 <Model position="0,0,0" direction="0,100,0" roll=0 scale=1 mesh="escortShip.mesh" /> 36 <Model position="0,0,0" direction="0,100,0" roll=0 scale=1 mesh="escortWeapon.mesh" /> 51 37 <!--Model mesh="cube.mesh" mass=10 position="0,0,3" scale3D="10,4,8" /> 52 38 <Model mesh="cube.mesh" mass=10 position="12.6,-2,3" scale3D="2.8,2.8,11" /> … … 54 40 <Model mesh="cube.mesh" mass=10 position="0,0,-12" scale3D="4,4,7" /--> 55 41 </attached> 56 <collisionShapes>57 <BoxCollisionShape position="0 ,0 , 3" halfExtents="10, 4,8" />58 <BoxCollisionShape position="12.6 ,-2, 3" halfExtents="2.8,2.8,11"/>59 <BoxCollisionShape position="-12.6,-2, 3" halfExtents="2.8,2.8,11"/>60 <BoxCollisionShape position="0, 0,-12" halfExtents="4 , 4 ,7" />61 </collisionShapes>62 42 <explosion > 63 43 <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" /> … … 80 60 <OrxoBloxShip> 81 61 <camerapositions> 82 <!--<CameraPosition position="0,100,180" direction="0, -0.2, -1" drag=false mouselook=true /> 83 <CameraPosition position="0,200,250" direction="0, -0.4, -1" drag=false mouselook=true /> 84 <CameraPosition position="0,30,150" direction="0, 0, -1" drag=false mouselook=true /> 85 <CameraPosition position="0,1300,-100" direction="0, -1, 0" drag=false mouselook=true /> 86 --> 87 <CameraPosition position="0,600,0" pitch=-90 absolute=true drag = false mouselook=true/> 88 <CameraPosition position="0,50,160" drag=true mouselook=true /> 62 <CameraPosition position="0,100,0" pitch=-90 absolute=true drag = false mouselook=true/> 63 <CameraPosition position="0,0,0" drag=true mouselook=true /> 89 64 <CameraPosition position="0,40,125" drag=true mouselook=true /> 90 65 <CameraPosition position="0,30, 90" drag=true mouselook=true /> … … 96 71 <MultiStateEngine 97 72 boostfactor = 2.2 98 99 speedfront = 200100 speedback = 200101 speedleftright = 100102 speedupdown = 100103 73 104 74 defEngineSndNormal = "sounds/Engine_low.ogg" … … 112 82 > 113 83 114 <!-- backlight error if you fly over the edge115 <EffectContainer condition="idle">116 <WorldSound mainstate="activity" source="sounds/Engine_idle.ogg" looping=1 active=false/>117 </EffectContainer>118 <EffectContainer condition="not idle">119 <FadingBillboard mainstate=activity active=false scale=0.09 position="12, -2, 13" colour="0.2, 1.0, 0.65, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />120 <FadingBillboard mainstate=activity active=false scale=0.09 position="-12, -2, 13" colour="0.2, 1.0, 0.65, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />121 </EffectContainer>122 <EffectContainer condition="normal or brake">123 124 </EffectContainer>125 <EffectContainer condition="normal or boost">126 <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, 0, 10" colour="0.2, 1.0, 0.65, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />127 <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, 0, 10" colour="0.2, 1.0, 0.65, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />128 </EffectContainer>129 <EffectContainer condition="boost">130 <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, 0, 10" colour="0.6, 0.8, 0.75, 0.7" width=25 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />131 <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, 0, 10" colour="0.6, 0.8, 0.75, 0.7" width=25 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />132 </EffectContainer>133 134 -->135 84 136 85 </MultiStateEngine> -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/CMakeLists.txt
r12366 r12367 7 7 OrxoBloxStones.cc 8 8 OrxoBloxScore.cc 9 9 OrxoBloxShip.cc 10 10 11 11 ) -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
r12366 r12367 129 129 */ 130 130 void OrxoBlox::start() 131 131 132 { 132 133 if (this->center_ != nullptr) // There needs to be a OrxoBloxCenterpoint, i.e. the area the game takes place. … … 169 170 // Set variable to temporarily force the player to spawn. 170 171 // Set variable to temporarily force the player to spawn. 171 bool temp = this->bForceSpawn_;172 //bool temp = this->bForceSpawn_; 172 173 this->bForceSpawn_ = true; 173 174 … … 176 177 177 178 // Reset the variable. 178 this->bForceSpawn_ = temp;179 //this->bForceSpawn_ = temp; 179 180 180 181 } … … 206 207 } 207 208 208 void OrxoBlox::spawnPlayer(PlayerInfo* player)209 {210 assert(player);211 212 if(this->player_ == nullptr)213 {214 this->player_ = player;215 this->players_[player].state_ = PlayerState::Alive;216 }217 218 }209 // void OrxoBlox::spawnPlayer(PlayerInfo* player) 210 // { 211 // assert(player); 212 213 // if(this->player_ == nullptr) 214 // { 215 // this->player_ = player; 216 // this->players_[player].state_ = PlayerState::Alive; 217 // } 218 219 // } 219 220 220 221 void OrxoBlox::LevelUp(){ … … 287 288 OrxoBloxStones* OrxoBlox::CheckForCollision(OrxoBloxBall* Ball) { 288 289 289 orxout() << "Checking for Collision" << endl;290 //orxout() << "Checking for Collision" << endl; 290 291 Vector3 BallPosition = Ball->getPosition(); 291 292 for(OrxoBloxStones* someStone : this->stones_) … … 295 296 continue; 296 297 } 297 orxout() << "Checking a stone" << endl;298 //orxout() << "Checking a stone" << endl; 298 299 const Vector3& StonePosition = someStone->getPosition(); //!< Saves the position of the currentStone 299 300 int size = someStone->getSize()/2; … … 307 308 return nullptr; 308 309 } 310 311 void OrxoBlox::playerPreSpawn(PlayerInfo* player) 312 { 313 this->player_ = player; 314 } 309 315 310 316 } -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h
r12359 r12367 74 74 75 75 PlayerInfo* getPlayer(); 76 void spawnPlayer(PlayerInfo* Player) override; 76 // void spawnPlayer(PlayerInfo* Player) override; 77 virtual void playerPreSpawn(PlayerInfo* player) override; 78 77 79 78 80 void LevelUp(); -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxShip.cc
r12337 r12367 34 34 35 35 #include "OrxoBloxShip.h" 36 #include "OrxoBlox.h" 36 37 #include "core/CoreIncludes.h" 37 38 … … 47 48 this->width = 120; 48 49 this->height = 100; 49 orxout() << "S pawned" << std::endl;50 orxout() << "SPACESHIP Spawned" << std::endl; 50 51 51 52 //timer.setTimer(3.5f, true, createExecutor(createFunctor(&OrxoBloxShip::showorientation, this))); … … 71 72 Vector3 pos = this->getPosition(); 72 73 73 //ensure that the ship stays in playing field74 if(pos.x > width/2) pos.x = -width/2;75 if(pos.x < -width/2) pos.x = width/2;76 77 //2D movement, position should always = 0 on y-axis78 if(pos.y!=0) pos.y = 0;79 this->setPosition(pos);80 if(pos.z!=50) pos.z = 50;81 74 } 82 75 … … 97 90 } 98 91 } 92 -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxShip.h
r12298 r12367 36 36 37 37 38 #include " asteroids2D/Asteroids2DPrereqs.h"38 #include "OrxoBloxPrereqs.h" 39 39 40 40 #include "worldentities/pawns/SpaceShip.h"
Note: See TracChangeset
for help on using the changeset viewer.