chroma_solstice/wired_switch.lua

18 lines
506 B
Lua
Raw Normal View History

2026-08-11 22:55:58 -04:00
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