diff options
| author | cursed22bc <admin@pixeldawn.org> | 2026-03-10 21:55:19 +0200 |
|---|---|---|
| committer | cursed22bc <admin@pixeldawn.org> | 2026-03-10 21:55:19 +0200 |
| commit | 90af3a717b82a817e7fe8c756763f30d720efd95 (patch) | |
| tree | 5a33f5fd57e43aec800cbee28e8d161b7a9894f7 /tilemap.lua | |
| parent | 70b6d2a335a40ae60e990cc5f37b828ed9dbf526 (diff) | |
door logic
Diffstat (limited to 'tilemap.lua')
| -rw-r--r-- | tilemap.lua | 8 |
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 |
