- Timestamp:
- May 21, 2015, 4:26:39 PM (9 years ago)
- Location:
- code/branches/presentationFS15
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentationFS15
- Property svn:mergeinfo changed
/code/branches/core7 (added) merged: 10350 /code/branches/towerdefenseFS15 (added) merged: 10283,10319,10325,10335,10340,10351,10368,10378,10388,10394,10397,10406,10408,10430,10451
- Property svn:mergeinfo changed
-
code/branches/presentationFS15/src/modules/towerdefense/TDCoordinate.cc
r10258 r10452 17 17 { 18 18 //RegisterObject(TDCoordinate); 19 x=0; 20 y=0; 19 Set(0,0); 21 20 22 21 } 23 22 24 23 TDCoordinate::TDCoordinate(int x, int y) 25 { 26 this->x=x; 27 this->y=y; 24 { 25 Set(x,y); 26 } 27 28 void TDCoordinate::Set(int x, int y) 29 { 30 if (x < 0) 31 { 32 _x = 0; 33 } 34 else if (x > 15) 35 { 36 _x = 15; 37 } 38 else 39 { 40 _x = x; 41 } 42 43 if (y < 0) 44 { 45 _y = 0; 46 } 47 else if (y > 15) 48 { 49 _y = 15; 50 } 51 else 52 { 53 _y = y; 54 } 55 } 56 57 int TDCoordinate::GetX() 58 { 59 return _x; 60 } 61 62 int TDCoordinate::GetY() 63 { 64 return _y; 28 65 } 29 66 … … 34 71 35 72 Vector3 *coord = new Vector3(); 36 coord->x= ( x-8) * tileScale;37 coord->y= ( y-8) * tileScale;73 coord->x= (_x-8) * tileScale; 74 coord->y= (_y-8) * tileScale; 38 75 coord->z=100; 39 76
Note: See TracChangeset
for help on using the changeset viewer.