kill dead code
This commit is contained in:
parent
a8b469876d
commit
7fa9171ba1
9 changed files with 72 additions and 187 deletions
10
door.lua
10
door.lua
|
|
@ -9,9 +9,9 @@ function Door:initialize(x, y)
|
|||
color = "white",
|
||||
collision = "unmoveable",
|
||||
sprites = {
|
||||
red = sprites.door.red,
|
||||
green = sprites.door.green,
|
||||
blue = sprites.door.blue,
|
||||
red = loadSprite("art/game/door_r.png"),
|
||||
green = loadSprite("art/game/door_g.png"),
|
||||
blue = loadSprite("art/game/door_b.png"),
|
||||
},
|
||||
})
|
||||
self.locked = true
|
||||
|
|
@ -29,9 +29,9 @@ function Door:refreshSprites()
|
|||
self.sprites = {}
|
||||
for _, c in ipairs({"red", "green", "blue"}) do
|
||||
if self.locked then
|
||||
if self.colors[c] then self.sprites[c] = sprites.door[c] end
|
||||
if self.colors[c] then self.sprites[c] = loadSprite("art/game/door_" .. c:sub(1, 1) .. ".png") end
|
||||
else
|
||||
self.sprites[c] = sprites.door.unlocked
|
||||
self.sprites[c] = loadSprite("art/game/door_unlocked.png")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue