source:
code/branches/presentationHS14merge/src/modules/towerdefense/TDCoordinate.cc
@
10255
Last change on this file since 10255 was 10248, checked in by landauf, 10 years ago | |
---|---|
|
|
File size: 678 bytes |
Rev | Line | |
---|---|---|
[10105] | 1 | #include "TDCoordinate.h" |
2 | ||
3 | #include "towerdefense/TowerDefensePrereqs.h" | |
4 | ||
5 | ||
6 | ||
7 | ||
8 | namespace orxonox | |
9 | { | |
[10106] | 10 | //RegisterClass(TDCoordinate); |
[10105] | 11 | |
12 | /** | |
13 | @brief | |
14 | Constructor. Registers and initializes the object. | |
15 | */ | |
16 | TDCoordinate::TDCoordinate() | |
17 | { | |
[10106] | 18 | //RegisterObject(TDCoordinate); |
[10105] | 19 | x=0; |
20 | y=0; | |
21 | ||
22 | } | |
23 | ||
24 | TDCoordinate::TDCoordinate(int x, int y) | |
25 | { | |
[10246] | 26 | this->x=x; |
27 | this->y=y; | |
[10105] | 28 | } |
29 | ||
30 | ||
31 | Vector3 TDCoordinate::get3dcoordinate() | |
32 | { | |
[10246] | 33 | float tileScale = 100; |
[10105] | 34 | |
[10246] | 35 | Vector3 *coord = new Vector3(); |
36 | coord->x= (x-8) * tileScale; | |
37 | coord->y= (y-8) * tileScale; | |
38 | coord->z=100; | |
[10105] | 39 | |
[10246] | 40 | return *coord; |
[10105] | 41 | } |
42 | } |
Note: See TracBrowser
for help on using the repository browser.