Don't keep around slimes from the previous cycle
This commit is contained in:
parent
2be9ed6202
commit
00c8127bf9
|
@ -177,6 +177,8 @@ end
|
|||
|
||||
function spawnSlimes()
|
||||
-- Try spawning 20 slimes, but if they don't hit any location then don't care
|
||||
slimes = {}
|
||||
|
||||
for i = 1, 20 do
|
||||
local x = math.random(2, cavern.width - 1)
|
||||
local y = math.random(2, cavern.height - 1)
|
||||
|
@ -728,7 +730,7 @@ function drawCavern()
|
|||
love.graphics.rectangle('fill', x, y, x_scale, y_scale)
|
||||
else
|
||||
print("Impossible tile!!!")
|
||||
love.graphics.setColor(1, 0, 0)
|
||||
love.graphics.setColor(1, 1, 0)
|
||||
love.graphics.rectangle('fill', x, y, x_scale, y_scale)
|
||||
end
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue