TileMapDefs2D.pkg 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. $#include "TileMapDefs2D.h"
  2. enum Orientation2D
  3. {
  4. O_ORTHOGONAL,
  5. O_ISOMETRIC
  6. };
  7. enum TileMapLayerType2D
  8. {
  9. LT_TILE_LAYER,
  10. LT_OBJECT_GROUP,
  11. LT_IMAGE_LAYER,
  12. LT_INVALID
  13. };
  14. enum TileObjectType2D
  15. {
  16. OT_RECTANGLE,
  17. OT_ELLIPSE,
  18. OT_POLYGON,
  19. OT_POLYLINE,
  20. OT_TILE,
  21. OT_INVALID
  22. };
  23. class PropertySet2D
  24. {
  25. bool HasProperty(const String& name) const;
  26. const String& GetProperty(const String& name) const;
  27. };
  28. class Tile2D
  29. {
  30. int GetGid() const;
  31. Sprite2D* GetSprite() const;
  32. bool HasProperty(const String& name) const;
  33. const String& GetProperty(const String& name) const;
  34. tolua_readonly tolua_property__get_set int gid;
  35. tolua_readonly tolua_property__get_set Sprite2D* sprite;
  36. };
  37. class TileObject2D
  38. {
  39. TileObjectType2D GetType() const;
  40. const Vector2& GetPosition() const;
  41. const Vector2& GetSize() const;
  42. unsigned GetNumPoints() const;
  43. const Vector2& GetPoint(unsigned index) const;
  44. int GetTileGid() const;
  45. Sprite2D* GetTileSprite() const;
  46. bool HasProperty(const String& name) const;
  47. const String& GetProperty(const String& name) const;
  48. tolua_readonly tolua_property__get_set TileObjectType2D type;
  49. tolua_readonly tolua_property__get_set Vector2 position;
  50. tolua_readonly tolua_property__get_set Vector2 size;
  51. tolua_readonly tolua_property__get_set unsigned numPoints;
  52. tolua_readonly tolua_property__get_set int tileGid;
  53. tolua_readonly tolua_property__get_set Sprite2D* tileSprite;
  54. };