Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.cc @ 12050

Last change on this file since 12050 was 12050, checked in by stadlero, 6 years ago

Eine XMLPort Funktion in der Gameboard-Klasse hinzugefügt

File size: 1.7 KB
Line 
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
12namespace 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        this->neighbors = std::vector<WagnisProvince*>();
24    }
25    //Destructor
26    WagnisProvince::~WagnisProvince(){
27
28    }
29
30
31
32
33    //SET()
34
35    //set Position
36    void WagnisProvince::setPosition(const Vector3& position){
37        //TODO
38    }
39    //set Orientation
40    void WagnisProvince::setOrientation(const Quaternion& orientation){
41        //TODO
42    }
43    //set owner_ID
44    void WagnisProvince::setOwner_ID(int owner){
45        this->owner_ID = owner;
46    }
47    //set troops
48    void WagnisProvince::setTroops(int troops){
49        this->troops = troops;
50    }
51    //set ID
52    void WagnisProvince::setID(int id){
53        this->ID = id;
54    }
55    //set Continent
56    void WagnisProvince::setContinent(int cont){
57        this->continent = cont;
58    }
59
60
61    //GET()
62
63    //get owner_ID
64    int WagnisProvince::getOwner_ID(){
65        return this->owner_ID;
66    }
67    //get troops
68    int WagnisProvince::getTroops(){
69        return this->troops;
70    }
71    //get ID
72    int WagnisProvince::getID(){
73        return this->ID;
74    }
75    //get continent
76    int WagnisProvince::getContinent(){
77        return this-> continent;
78    }
79
80    //Creates a connection between two provinces.
81    void WagnisProvince::addNeighbor(WagnisProvince* prov){
82        neighbors.push_back(prov);
83        prov->neighbors.push_back(this);
84    }
85}
Note: See TracBrowser for help on using the repository browser.