diff --git a/Source/Particles.lua b/Source/Particles.lua index c33bfea..cede141 100644 --- a/Source/Particles.lua +++ b/Source/Particles.lua @@ -34,6 +34,19 @@ function explode(_x,_y) end end +function miniExplode(_x,_y) + for i = 1, 6, 1 do + local part = { + x = _x, + y = _y, + dir = math.random(0,359), + size = math.random(7,10), + speed = math.random(1,3) + } + exps[#exps+1] = part + end +end + function processStars(_x,_y) gfx.setColor(gfx.kColorWhite) for star = 1, #stars do diff --git a/Source/Player.lua b/Source/Player.lua index 8eeb2e9..facd274 100644 --- a/Source/Player.lua +++ b/Source/Player.lua @@ -42,6 +42,7 @@ local function die() active = false velocity = {x=0,y=0} sprRocket:moveTo(startpos.x, startpos.y) + miniExplode(startpos.x,startpos.y) end function addPlayer(_x,_y,__x,__y) diff --git a/Source/Saws.lua b/Source/Saws.lua index 770b242..9d4c0b3 100644 --- a/Source/Saws.lua +++ b/Source/Saws.lua @@ -97,8 +97,11 @@ function updateSaws() fuels[fuel]:setImage(loopFuel:image()) if #fuels[fuel]:overlappingSprites() > 0 and fuels[fuel].active then fuels[fuel].active = false + miniExplode(fuels[fuel].x,fuels[fuel].y) fuels[fuel]:remove() energy += 1 + table.remove(fuels,fuel) + break end end