wired switches and doors
This commit is contained in:
parent
ee7d36e72b
commit
bc4976b324
16 changed files with 2575 additions and 835 deletions
17
wired_switch.lua
Normal file
17
wired_switch.lua
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue