Changeset 12136 for code/branches/wagnis_HS18/src/modules
- Timestamp:
- Dec 5, 2018, 9:26:18 AM (6 years ago)
- Location:
- code/branches/wagnis_HS18/src/modules
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
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.