Changeset 12136 for code/branches
- Timestamp:
- Dec 5, 2018, 9:26:18 AM (6 years ago)
- Location:
- code/branches/wagnis_HS18
- Files:
-
- 2 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/wagnis_HS18/data/levels/Wagnis_testlevel.oxw
r12133 r12136 37 37 <Provinces> 38 38 39 <WagnisProvince ID="1" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType= dynamic mass=100 continent="1" position="0,<?lua print((50))?>,<?lua print((70))?>" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">39 <WagnisProvince ID="1" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="1" position="0,<?lua print((50))?>,<?lua print((70))?>" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>"> 40 40 <attached> 41 41 <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" /> 42 42 </attached> 43 43 <collisionShapes> 44 < SphereCollisionShape position="0,0,0" radius="2" />44 <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 45 45 </collisionShapes> 46 46 </WagnisProvince> 47 47 48 <WagnisProvince ID="2" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType= dynamic mass=100 continent="1" position="0,<?lua print((40))?>,<?lua print((70))?>" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">48 <WagnisProvince ID="2" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="1" position="0,<?lua print((40))?>,<?lua print((70))?>" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>"> 49 49 <attached> 50 50 <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" /> 51 51 </attached> 52 52 <collisionShapes> 53 < SphereCollisionShape position="0,0,0" radius="2" />53 <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 54 54 </collisionShapes> 55 55 </WagnisProvince> 56 56 57 <WagnisProvince ID="3" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType= dynamic mass=100 continent="1" position="0,<?lua print((50))?>,<?lua print((80))?>" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">57 <WagnisProvince ID="3" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="1" position="0,<?lua print((40))?>,<?lua print((60))?>" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>"> 58 58 <attached> 59 59 <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" /> 60 60 </attached> 61 61 <collisionShapes> 62 < SphereCollisionShape position="0,0,0" radius="2" />62 <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 63 63 </collisionShapes> 64 64 </WagnisProvince> 65 65 66 <WagnisProvince ID="1000" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=dynamic mass=100 continent="1" position="0,<?lua print((50+7))?>,<?lua print((135-6))?>" pitch=90 rotationrate="0" rotationaxis="0,0,0"> 66 <WagnisProvince ID="4" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="1" position="0,<?lua print((50))?>,<?lua print((60))?>" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>"> 67 <attached> 68 <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" /> 69 </attached> 70 <collisionShapes> 71 <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 72 </collisionShapes> 73 </WagnisProvince> 74 75 <WagnisProvince ID="5" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="1" position="0,<?lua print((50))?>,<?lua print((100))?>" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>"> 76 <attached> 77 <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" /> 78 </attached> 79 <collisionShapes> 80 <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 81 </collisionShapes> 82 </WagnisProvince> 83 84 <WagnisProvince ID="6" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="1" position="0,<?lua print((50))?>,<?lua print((110))?>" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>"> 85 <attached> 86 <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" /> 87 </attached> 88 <collisionShapes> 89 <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 90 </collisionShapes> 91 </WagnisProvince> 92 93 <WagnisProvince ID="7" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="1" position="0,<?lua print((50))?>,<?lua print((120))?>" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>"> 94 <attached> 95 <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" /> 96 </attached> 97 <collisionShapes> 98 <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 99 </collisionShapes> 100 </WagnisProvince> 101 102 <WagnisProvince ID="8" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="1" position="0,<?lua print((40))?>,<?lua print((130))?>" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>"> 103 <attached> 104 <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" /> 105 </attached> 106 <collisionShapes> 107 <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 108 </collisionShapes> 109 </WagnisProvince> 110 111 <WagnisProvince ID="1000" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="1" position="0,<?lua print((50+7))?>,<?lua print((135-6))?>" pitch=90 rotationrate="0" rotationaxis="0,0,0"> 67 112 <attached> 68 113 <Model position="0,0,0" mesh="broke-satellite.mesh" scale3D="3,3,3" /> 69 114 </attached> 70 115 <collisionShapes> 71 < SphereCollisionShape position="0,0,0" radius="4" />116 <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 72 117 </collisionShapes> 73 118 </WagnisProvince> -
code/branches/wagnis_HS18/data/levels/templates/wagnisCursor.oxt
r12133 r12136 2 2 <SpaceShip 3 3 hudtemplate = WagnisHUD 4 camerapositiontemplate = spaceshipassffcameras5 spawnparticlesource = "Orxonox/fairytwirl"6 spawnparticleduration = 37 8 health = 1009 maxhealth = 20010 initialhealth = 10011 12 shieldhealth = 3013 initialshieldhealth = 3014 maxshieldhealth = 5015 shieldabsorption = 0.8f16 shieldrechargerate = 117 shieldrechargewaittime = 118 19 primaryThrust = 020 auxilaryThrust = 021 rotationThrust = 022 23 lift = 1;24 stallSpeed = 0;25 26 boostPower = 027 boostPowerRate = 028 boostRate = 029 boostCooldownDuration = 030 31 shakeFrequency = 1532 shakeAmplitude = 933 34 collisionType = "dynamic"35 mass = 10036 linearDamping = 0.737 angularDamping = 0.999999938 39 explosionSound = "sounds/Explosion2.ogg"40 4 > 41 5 -
code/branches/wagnis_HS18/data/overlays/WagnisHUD.oxo
r12134 r12136 1 1 <Template name="WagnisHUD"> 2 <OverlayGroup name = "WagnisHuD" scale = "1 , 1">2 <OverlayGroup name = "WagnisHuD" scale = "100, 100"> 3 3 4 < HUDNavigation4 <WagnisHUD 5 5 name = "Navigation" 6 6 correctaspect = true -
code/branches/wagnis_HS18/src/modules/wagnis/CMakeLists.txt
r12119 r12136 4 4 WagnisPlayer.cc 5 5 Wagnis.cc 6 WagnisHUD.cc 6 7 ) 7 8 -
code/branches/wagnis_HS18/src/modules/wagnis/Wagnis.cc
r12133 r12136 17 17 this->active_player = 1; 18 18 19 int n = 3;19 int n = 8; 20 20 for(int i = 0;i < n;i++){ 21 21 WagnisPlayer* p = new WagnisPlayer(context); -
code/branches/wagnis_HS18/src/modules/wagnis/WagnisPlayer.cc
r12135 r12136 31 31 32 32 if(this->is_active) 33 { 34 33 { 35 34 for(WagnisProvince* prov:this->gameBoard->provs){ 36 35 //orxout()<<"province health: "<<prov->getHealth()<<endl; … … 76 75 case REINFORCEMENT_STAGE: 77 76 { 78 int i = reinforcementCounter(); //i tells how many troops player gets 79 while (i > 0) 77 if ( reinforcements > 0) 80 78 { 81 79 if (checkMove(SET_TROOPS)) … … 83 81 this->target_province->setTroops(this->target_province->getTroops()+1); 84 82 orxout()<<"Province "<<this->target_province->getID()<<" owned by Player "<<this->target_province->getOwner_ID()<<" troops: "<<this->target_province->getTroops()<<endl; 85 --i;86 83 } 87 } 88 89 master->playerFinishedStageCallback(this); 84 } 90 85 91 86 break; … … 359 354 } 360 355 361 int WagnisPlayer::reinforcementCounter() //calculates how many troops a player gets at beginning of his turn356 int WagnisPlayer::reinforcementCounter() //calculates and sets reeinforcements how many troops a player gets at beginning of his turn 362 357 { 363 358 364 return 10; 359 reinforcements = 10; 360 orxout()<<"derp"<<endl; 365 361 /* 366 362 int counter = 0; -
code/branches/wagnis_HS18/src/modules/wagnis/WagnisPlayer.h
r12135 r12136 47 47 WagnisProvince* origin_province; 48 48 WagnisProvince* target_province; 49 int reinforcements; 49 50 bool isNeighbour(WagnisProvince*, WagnisProvince*); 50 51 bool existPath(WagnisProvince*, WagnisProvince*); -
code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.cc
r12134 r12136 21 21 this->troops = 0; 22 22 this->setRadarName(std::to_string(0)); 23 this->setRadarObjectColour(colour({128,128,128}, 100.0f)); 23 24 this->ID = -1; 24 25 this->continent = -1; … … 50 51 void WagnisProvince::setOwner_ID(int owner){ 51 52 this->owner_ID = owner; 53 switch(owner){ 54 case 1: this->setRadarObjectColour( colour({255,0,0}, 100.0f) ); 55 break; 56 case 2: this->setRadarObjectColour( colour({0,255,0}, 100.0f) ); 57 break; 58 case 3: this->setRadarObjectColour( colour({0,0,255}, 100.0f) ); 59 break; 60 case 4: this->setRadarObjectColour( colour({255,255,0}, 100.0f) ); 61 break; 62 case 5: this->setRadarObjectColour( colour({255,0,255}, 100.0f) ); 63 break; 64 case 6: this->setRadarObjectColour( colour({128,128,0}, 40.0f) ); 65 break; 66 case 7: this->setRadarObjectColour( colour({0,255,255}, 100.0f) ); 67 break; 68 case 8: this->setRadarObjectColour( colour({153,255,204}, 100.0f) ); 69 break; 70 case 9: this->setRadarObjectColour( colour({102,51,0}, 100.0f) ); 71 break; 72 } 73 52 74 } 53 75 //set troops -
code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.h
r12134 r12136 42 42 43 43 std::vector<WagnisProvince*> neighbors; 44 int owner_ID;45 44 int ID; 46 45 int continent; … … 48 47 private: 49 48 int troops; 49 int owner_ID; 50 50 51 51 }; -
code/branches/wagnis_HS18/src/modules/weapons/projectiles/WagnisProjectile.cc
r12129 r12136 50 50 // Create a sphere collision shape and attach it to the projectile. 51 51 collisionShape_ = new SphereCollisionShape(this->getContext()); 52 setCollisionShapeRadius( 2.0f);52 setCollisionShapeRadius(3.0f); 53 53 this->attachCollisionShape(collisionShape_); 54 54 -
code/branches/wagnis_HS18/src/modules/weapons/weaponmodes/WagnisGun.cc
r12129 r12136 51 51 this->reloadTime_ = 0.1f; 52 52 this->damage_ = 0.0f; //default 15 53 this->speed_ = 1000.0f;53 this->speed_ = 800.0f; 54 54 this->delay_ = 0.0f; 55 55 this->setMunitionName("LaserMunition");
Note: See TracChangeset
for help on using the changeset viewer.