Don't keep around slimes from the previous cycle

This commit is contained in:
Juhani Krekelä 2019-06-30 00:04:12 +03:00
parent 2be9ed6202
commit 00c8127bf9
1 changed files with 3 additions and 1 deletions

View File

@ -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