1$#include "Urho2D/TileMapDefs2D.h"
2
3enum Orientation2D
4{
5    O_ORTHOGONAL,
6    O_ISOMETRIC,
7    O_STAGGERED,
8    O_HEXAGONAL
9};
10
11struct TileMapInfo2D
12{
13    Orientation2D orientation_ @ orientation;
14    int width_ @ width;
15    int height_ @ height;
16    float tileWidth_ @ tileWidth;
17    float tileHeight_ @ tileHeight;
18
19    float GetMapWidth() const;
20    float GetMapHeight() const;
21
22    tolua_readonly tolua_property__get_set float mapWidth;
23    tolua_readonly tolua_property__get_set float mapHeight;
24};
25
26enum TileMapLayerType2D
27{
28    LT_TILE_LAYER,
29    LT_OBJECT_GROUP,
30    LT_IMAGE_LAYER,
31    LT_INVALID
32};
33
34enum TileMapObjectType2D
35{
36    OT_RECTANGLE,
37    OT_ELLIPSE,
38    OT_POLYGON,
39    OT_POLYLINE,
40    OT_TILE,
41    OT_INVALID
42};
43
44class PropertySet2D
45{
46    bool HasProperty(const String name) const;
47    const String GetProperty(const String name) const;
48};
49
50class Tile2D
51{
52    int GetGid() const;
53    Sprite2D* GetSprite() const;
54    bool HasProperty(const String name) const;
55    const String GetProperty(const String name) const;
56
57    tolua_readonly tolua_property__get_set int gid;
58    tolua_readonly tolua_property__get_set Sprite2D* sprite;
59};
60
61class TileMapObject2D
62{
63    TileMapObjectType2D GetObjectType() const;
64    const String GetName() const;
65    const String GetType() const;
66    const Vector2& GetPosition() const;
67    const Vector2& GetSize() const;
68    unsigned GetNumPoints() const;
69    const Vector2& GetPoint(unsigned index) const;
70    int GetTileGid() const;
71    Sprite2D* GetTileSprite() const;
72    bool HasProperty(const String name) const;
73    const String GetProperty(const String name) const;
74
75    tolua_readonly tolua_property__get_set TileMapObjectType2D objectType;
76    tolua_readonly tolua_property__get_set String name;
77    tolua_readonly tolua_property__get_set String type;
78    tolua_readonly tolua_property__get_set Vector2 position;
79    tolua_readonly tolua_property__get_set Vector2 size;
80    tolua_readonly tolua_property__get_set unsigned numPoints;
81    tolua_readonly tolua_property__get_set int tileGid;
82    tolua_readonly tolua_property__get_set Sprite2D* tileSprite;
83};
84