Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 10527 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
RevLine 
[10105]1#include "TDCoordinate.h"
2
3#include "towerdefense/TowerDefensePrereqs.h"
4
5
6
7
8namespace 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.