summaryrefslogtreecommitdiff
path: root/tilemap.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tilemap.lua')
-rw-r--r--tilemap.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/tilemap.lua b/tilemap.lua
index 72a186e..f809598 100644
--- a/tilemap.lua
+++ b/tilemap.lua
@@ -58,6 +58,7 @@ function Tilemap:new(mapPath, tilesets)
self.entitiesSpikes = {}
self.entitiesTextTriggers = {}
self.entitiesPickups = {}
+ self.entityDoor = nil
self.layerBackground = nil
self.layerDecorationBackground = nil
self.layerDecorationForeground = nil
@@ -146,6 +147,9 @@ function Tilemap:new(mapPath, tilesets)
table.insert(self.entitiesLiquidSurfaces, LiquidSurface:new(entity))
elseif name == "pickups" then
table.insert(self.entitiesPickups, Pickup.new(entity))
+ elseif name == "door" then
+ entity.isDoor = true
+ self.entityDoor = entity
end
end
end
@@ -175,6 +179,10 @@ function Tilemap:getEntitiesSpikes()
return self.entitiesSpikes
end
+function Tilemap:getEntityDoor()
+ return self.entityDoor
+end
+
function Tilemap:getEntitiesTextTriggers()
return self.entitiesTextTriggers
end