#include "WagnisProvince.h" #include "core/CoreIncludes.h" #include "BulletDynamics/Dynamics/btRigidBody.h" #include namespace orxonox { RegisterClass(WagnisProvince); //Constructor WagnisProvince::WagnisProvince(Context* context) : MovableEntity(context){ RegisterObject(WagnisProvince); this->owner_ID = 0; this->troops = 0; this->ID = -1; this->continent = -1; this->neighbors = std::vector(); } //Destructor WagnisProvince::~WagnisProvince(){ } //XML Port void WagnisProvince::XMLPort(Element& xmlelement,XMLPort::Mode mode){ SUPER(WagnisProvince, XMLPort, xmlelement, mode); XMLPortParam(WagnisProvince, "ID", setID, getID, xmlelement, mode); XMLPortParam(WagnisProvince, "continent", setContinent, getContinent, xmlelement, mode); } //SET() //set owner_ID void WagnisProvince::setOwner_ID(int owner){ this->owner_ID = owner; } //set troops void WagnisProvince::setTroops(int troops){ this->troops = troops; } //set ID void WagnisProvince::setID(int id){ this->ID = id; } //set Continent void WagnisProvince::setContinent(int cont){ this->continent = cont; } //GET() //get owner_ID int WagnisProvince::getOwner_ID() const{ return this->owner_ID; } //get troops int WagnisProvince::getTroops() const{ return this->troops; } //get ID int WagnisProvince::getID() const{ return this->ID; } //get continent int WagnisProvince::getContinent() const{ return this-> continent; } //Creates a connection between two provinces. void WagnisProvince::addNeighbor(WagnisProvince* prov){ neighbors.push_back(prov); prov->neighbors.push_back(this); } }