Rev | Line | |
---|
[12049] | 1 | |
---|
| 2 | |
---|
| 3 | |
---|
| 4 | |
---|
| 5 | |
---|
| 6 | |
---|
| 7 | #include "WagnisProvince.h" |
---|
| 8 | #include "core/CoreIncludes.h" |
---|
| 9 | #include "BulletDynamics/Dynamics/btRigidBody.h" |
---|
| 10 | #include <vector> |
---|
| 11 | |
---|
| 12 | namespace orxonox |
---|
| 13 | { |
---|
| 14 | RegisterClass(WagnisProvince); |
---|
| 15 | |
---|
| 16 | //Constructor |
---|
| 17 | WagnisProvince::WagnisProvince(Context* context) : StaticEntity(context){ |
---|
| 18 | RegisterObject(WagnisProvince); |
---|
| 19 | this->owner_ID = 0; |
---|
| 20 | this->troops = 0; |
---|
| 21 | this->ID = -1; |
---|
| 22 | this->continent = -1; |
---|
| 23 | } |
---|
| 24 | //Destructor |
---|
| 25 | WagnisProvince::~WagnisProvince(){ |
---|
| 26 | |
---|
| 27 | } |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | |
---|
| 31 | |
---|
| 32 | //SET() |
---|
| 33 | |
---|
| 34 | //set Position |
---|
| 35 | void WagnisProvince::setPosition(const Vector3& position){ |
---|
| 36 | //TODO |
---|
| 37 | } |
---|
| 38 | //set Orientation |
---|
| 39 | void WagnisProvince::setOrientation(const Quaternion& orientation){ |
---|
| 40 | //TODO |
---|
| 41 | } |
---|
| 42 | //set owner_ID |
---|
| 43 | void WagnisProvince::setOwner_ID(int owner){ |
---|
| 44 | this->owner_ID = owner; |
---|
| 45 | } |
---|
| 46 | //set troops |
---|
| 47 | void WagnisProvince::setTroops(int troops){ |
---|
| 48 | this->troops = troops; |
---|
| 49 | } |
---|
| 50 | //set ID |
---|
| 51 | void WagnisProvince::setID(int id){ |
---|
| 52 | this->ID = id; |
---|
| 53 | } |
---|
| 54 | //set Continent |
---|
| 55 | void WagnisProvince::setContinent(int cont){ |
---|
| 56 | this->continent = cont; |
---|
| 57 | } |
---|
| 58 | |
---|
| 59 | |
---|
| 60 | //GET() |
---|
| 61 | |
---|
| 62 | //get owner_ID |
---|
| 63 | int WagnisProvince::getOwner_ID(){ |
---|
| 64 | return this->owner_ID; |
---|
| 65 | } |
---|
| 66 | //get troops |
---|
| 67 | int WagnisProvince::getTroops(){ |
---|
| 68 | return this->troops; |
---|
| 69 | } |
---|
| 70 | //get ID |
---|
| 71 | int WagnisProvince::getID(){ |
---|
| 72 | return this->ID; |
---|
| 73 | } |
---|
| 74 | //get continent |
---|
| 75 | int WagnisProvince::getContinent(){ |
---|
| 76 | return this-> continent; |
---|
| 77 | } |
---|
| 78 | |
---|
| 79 | //Creates a connection between two provinces. |
---|
| 80 | void WagnisProvince::addNeighbor(WagnisProvince* prov){ |
---|
| 81 | neighbors.push_back(prov); |
---|
| 82 | prov->neighbors.push_back(this); |
---|
| 83 | } |
---|
| 84 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.