18 lines
506 B
Lua
18 lines
506 B
Lua
|
|
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
|