File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -510,8 +510,35 @@ var Tile = new Class({
510510 {
511511 return this . pixelY + this . height / 2 ;
512512 }
513- }
513+ } ,
514514
515+ /**
516+ * The tileset that contains this Tile. This will only return null if accessed from a LayerData
517+ * instance before the tile is placed within a StaticTilemapLayer or DynamicTilemapLayer.
518+ * @property {Tileset|null } tileset
519+ * @readonly
520+ */
521+ tileset : {
522+ get : function ( )
523+ {
524+ var tilemapLayer = this . tilemapLayer ;
525+ return tilemapLayer ? tilemapLayer . tileset : null ;
526+ }
527+ } ,
528+
529+ /**
530+ * The tilemap layer that contains this Tile. This will only return null if accessed from a
531+ * LayerData instance before the tile is placed within a StaticTilemapLayer or
532+ * DynamicTilemapLayer.
533+ * @property {StaticTilemapLayer|DynamicTilemapLayer|null } tilemapLayer
534+ * @readonly
535+ */
536+ tilemapLayer : {
537+ get : function ( )
538+ {
539+ return this . layer . tilemapLayer ;
540+ }
541+ }
515542} ) ;
516543
517544module . exports = Tile ;
You can’t perform that action at this time.
0 commit comments