player blocker

This commit is contained in:
Your Name 2026-08-11 20:29:35 -04:00
parent 0618cfc51d
commit a60f46d585
12 changed files with 1141 additions and 89 deletions

View file

@ -0,0 +1,21 @@
require "entity"
-- A visual boundary that only affects player movement. It deliberately stays
-- out of the ordinary collidable matrix, so moveable blocks can occupy and
-- pass through the same cell.
GenericPlayerBlocker = class("GenericPlayerBlocker", Entity)
function GenericPlayerBlocker:initialize(x, y, color, sprite, cellShape)
Entity.initialize(self, {
x = x,
y = y,
color = color,
collision = "none",
sprite = sprite,
cellShape = cellShape
})
end
function GenericPlayerBlocker:blocksPlayer()
return true
end