Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 5, 2018, 9:26:18 AM (6 years ago)
Author:
kunzro
Message:

HUD fixed

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  
    44  WagnisPlayer.cc
    55  Wagnis.cc
     6  WagnisHUD.cc
    67)
    78
  • code/branches/wagnis_HS18/src/modules/wagnis/Wagnis.cc

    r12133 r12136  
    1717    this->active_player = 1;
    1818
    19     int n = 3;
     19    int n = 8;
    2020    for(int i = 0;i < n;i++){
    2121        WagnisPlayer* p = new WagnisPlayer(context);
  • code/branches/wagnis_HS18/src/modules/wagnis/WagnisPlayer.cc

    r12135 r12136  
    3131
    3232        if(this->is_active)
    33         {
    34            
     33        {           
    3534            for(WagnisProvince* prov:this->gameBoard->provs){
    3635                //orxout()<<"province health: "<<prov->getHealth()<<endl;
     
    7675                    case REINFORCEMENT_STAGE:
    7776                    {
    78                         int i = reinforcementCounter(); //i tells how many troops player gets
    79                         while (i > 0)
     77                        if ( reinforcements > 0)
    8078                        {
    8179                            if (checkMove(SET_TROOPS))
     
    8381                                this->target_province->setTroops(this->target_province->getTroops()+1);
    8482                                orxout()<<"Province "<<this->target_province->getID()<<" owned by Player "<<this->target_province->getOwner_ID()<<" troops: "<<this->target_province->getTroops()<<endl;
    85                                 --i;
    8683                            }
    87                         }
    88 
    89                         master->playerFinishedStageCallback(this);   
     84                        }   
    9085                       
    9186                        break;
     
    359354    }
    360355
    361     int WagnisPlayer::reinforcementCounter() //calculates how many troops a player gets at beginning of his turn
     356    int WagnisPlayer::reinforcementCounter() //calculates and sets reeinforcements how many troops a player gets at beginning of his turn
    362357    {
    363358       
    364         return 10;
     359        reinforcements = 10;
     360        orxout()<<"derp"<<endl;
    365361        /*
    366362        int counter = 0;
  • code/branches/wagnis_HS18/src/modules/wagnis/WagnisPlayer.h

    r12135 r12136  
    4747        WagnisProvince* origin_province;
    4848        WagnisProvince* target_province;
     49        int reinforcements;
    4950        bool isNeighbour(WagnisProvince*, WagnisProvince*);
    5051        bool existPath(WagnisProvince*, WagnisProvince*);
  • code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.cc

    r12134 r12136  
    2121        this->troops = 0;
    2222        this->setRadarName(std::to_string(0));
     23        this->setRadarObjectColour(colour({128,128,128}, 100.0f));
    2324        this->ID = -1;
    2425        this->continent = -1;
     
    5051    void WagnisProvince::setOwner_ID(int owner){
    5152        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
    5274    }
    5375    //set troops
  • code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.h

    r12134 r12136  
    4242
    4343        std::vector<WagnisProvince*> neighbors;
    44         int owner_ID;
    4544        int ID;
    4645        int continent;
     
    4847        private:
    4948        int troops;
     49        int owner_ID;
    5050
    5151    };
  • code/branches/wagnis_HS18/src/modules/weapons/projectiles/WagnisProjectile.cc

    r12129 r12136  
    5050            // Create a sphere collision shape and attach it to the projectile.
    5151            collisionShape_ = new SphereCollisionShape(this->getContext());
    52             setCollisionShapeRadius(2.0f);
     52            setCollisionShapeRadius(3.0f);
    5353            this->attachCollisionShape(collisionShape_);
    5454
  • code/branches/wagnis_HS18/src/modules/weapons/weaponmodes/WagnisGun.cc

    r12129 r12136  
    5151        this->reloadTime_ = 0.1f;
    5252        this->damage_ = 0.0f; //default 15
    53         this->speed_ = 1000.0f;
     53        this->speed_ = 800.0f;
    5454        this->delay_ = 0.0f;
    5555        this->setMunitionName("LaserMunition");
Note: See TracChangeset for help on using the changeset viewer.