Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 12102


Ignore:
Timestamp:
Nov 14, 2018, 10:30:44 AM (6 years ago)
Author:
stadlero
Message:

Billboard added to Province

Location:
code/branches/wagnis_HS18/src/modules/wagnis
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.cc

    r12072 r12102  
    22#include "core/CoreIncludes.h"
    33#include "BulletDynamics/Dynamics/btRigidBody.h"
     4#include "worldentities/StaticEntity.h"
    45#include <vector>
    56
     
    1617        this->continent = -1;
    1718        this->neighbors = std::vector<WagnisProvince*>();
     19        this->markerBillboard = nullptr;
    1820    }
    1921    //Destructor
     
    2628        SUPER(WagnisProvince, XMLPort, xmlelement, mode);
    2729
     30        XMLPortObject(WagnisProvince, Billboard, "MarkerBillboard", addMarkerBillboard, getMarkerBillboard, xmlelement, mode);
    2831        XMLPortParam(WagnisProvince, "ID", setID, getID, xmlelement, mode);
    2932        XMLPortParam(WagnisProvince, "continent", setContinent, getContinent, xmlelement, mode);
     33    }
     34
     35    void WagnisProvince::addMarkerBillboard(Billboard* billi){
     36        this->markerBillboard = billi;
     37        attach(billi);
     38    }
     39    Billboard* WagnisProvince::getMarkerBillboard(unsigned int i) const{
     40        if(i != 0) return nullptr;
     41        return this->markerBillboard;
    3042    }
    3143
  • code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.h

    r12067 r12102  
    1111#include "core/XMLPort.h"
    1212#include "worldentities/MovableEntity.h"
     13#include "graphics/Billboard.h"
    1314#include <vector>
    1415
     
    2223        virtual ~WagnisProvince();
    2324        virtual void XMLPort(Element&,XMLPort::Mode);
     25        void addMarkerBillboard(Billboard*);
     26        Billboard* getMarkerBillboard(unsigned int) const;
    2427
    2528        void setOwner_ID(int);
     
    4144        int continent;
    4245        std::vector<WagnisProvince*> neighbors;
     46        Billboard* markerBillboard;
    4347    };
    4448}
Note: See TracChangeset for help on using the changeset viewer.