Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/modules/towerdefense/TDCoordinate.cc @ 10556

Last change on this file since 10556 was 10258, checked in by landauf, 10 years ago

merged presentationHS14merge back to trunk

  • Property svn:eol-style set to native
File size: 678 bytes
Line 
1#include "TDCoordinate.h"
2
3#include "towerdefense/TowerDefensePrereqs.h"
4
5
6
7
8namespace orxonox
9{
10    //RegisterClass(TDCoordinate);
11
12    /**
13    @brief
14        Constructor. Registers and initializes the object.
15    */
16    TDCoordinate::TDCoordinate()
17    {
18        //RegisterObject(TDCoordinate);
19        x=0;
20        y=0;
21
22    }
23
24    TDCoordinate::TDCoordinate(int x, int y)
25    {
26        this->x=x;
27        this->y=y;
28    }
29
30
31    Vector3 TDCoordinate::get3dcoordinate()
32    {
33        float tileScale = 100;
34
35        Vector3 *coord = new Vector3();
36        coord->x= (x-8) * tileScale;
37        coord->y= (y-8) * tileScale;
38        coord->z=100;
39
40        return *coord;
41    }
42}
Note: See TracBrowser for help on using the repository browser.