From d22630eab00d5be971f8e8f4255fb7d50c15ffbf Mon Sep 17 00:00:00 2001 From: cursed22bc Date: Tue, 10 Mar 2026 00:21:06 +0200 Subject: spikes --- tilemap.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tilemap.lua') diff --git a/tilemap.lua b/tilemap.lua index 09ce8d6..44d0db5 100644 --- a/tilemap.lua +++ b/tilemap.lua @@ -1,6 +1,7 @@ local Entity = require("entity") local Liquid = require("liquid") local LiquidSurface = require("liquidSurface") +local Spike = require("spike") local Tilemap = {} Tilemap.__index = Tilemap @@ -52,6 +53,7 @@ function Tilemap:new(mapPath, tilesets) self.entitiesCameraBorders = {} self.entitiesLiquidPolygons = {} self.entitiesLiquidSurfaces = {} + self.entitiesSpikes = {} self.layerBackground = nil self.layerDecorationBackground = nil self.layerDecorationForeground = nil @@ -128,6 +130,9 @@ function Tilemap:new(mapPath, tilesets) table.insert(self.entitiesTiles, entity) elseif name == "spawn" then table.insert(self.entitiesSpawns, entity) + elseif name == "spikes" then + table.insert(self.entitiesSpikes, Spike.new(entity)) + elseif name == "camera_border" then table.insert(self.entitiesCameraBorders, entity) elseif name == "liquid" then @@ -159,6 +164,10 @@ function Tilemap:getEntitiesSpawns() return self.entitiesSpawns end +function Tilemap:getEntitiesSpikes() + return self.entitiesSpikes +end + function Tilemap:getEntitiesCameraBorders() return self.entitiesCameraBorders end -- cgit v1.2.3