wired switches and doors

This commit is contained in:
Your Name 2026-08-11 22:55:58 -04:00
parent ee7d36e72b
commit bc4976b324
16 changed files with 2575 additions and 835 deletions

17
wired_switch.lua Normal file
View file

@ -0,0 +1,17 @@
require "switch"
WiredSwitch = class("WiredSwitch", Switch)
function WiredSwitch:initialize(x, y, color)
Switch.initialize(self, x, y, color)
self.wired = true
end
function WiredSwitch:draw(channel)
Entity.draw(self, channel)
if not self.sprites[channel] then return end
local p = self:getDrawPos()
love.graphics.setColor(1, 1, 1, 0.9)
love.graphics.setLineWidth(math.max(1, drawScale))
love.graphics.rectangle("line", p.x + 5 * drawScale, p.y + 5 * drawScale, 6 * drawScale, 6 * drawScale)
end