gameover
This commit is contained in:
parent
b7d3bcce27
commit
33cb763493
4 changed files with 14 additions and 2 deletions
|
@ -12,7 +12,8 @@ multilily = lily.loadMulti({
|
||||||
{lily.newImage, "assets/particle.png"},
|
{lily.newImage, "assets/particle.png"},
|
||||||
{lily.newImage, "assets/tiles/gf.png"},
|
{lily.newImage, "assets/tiles/gf.png"},
|
||||||
{lily.newImage, "assets/explosion.png"},
|
{lily.newImage, "assets/explosion.png"},
|
||||||
{lily.newImage, "assets/weapons/bullet.png"}
|
{lily.newImage, "assets/weapons/bullet.png"},
|
||||||
|
{lily.newImage, "assets/gameover.png"},
|
||||||
})
|
})
|
||||||
multilily:onComplete(function(_, lilies)
|
multilily:onComplete(function(_, lilies)
|
||||||
gameLogo = lilies[1][1]
|
gameLogo = lilies[1][1]
|
||||||
|
@ -29,6 +30,7 @@ multilily:onComplete(function(_, lilies)
|
||||||
tileGroundFull = lilies[12][1]
|
tileGroundFull = lilies[12][1]
|
||||||
explosionParticle = lilies[13][1]
|
explosionParticle = lilies[13][1]
|
||||||
bulletShot = lilies[14][1]
|
bulletShot = lilies[14][1]
|
||||||
|
gameoverLogo = lilies[15][1]
|
||||||
|
|
||||||
windowWidth = love.graphics.getWidth()
|
windowWidth = love.graphics.getWidth()
|
||||||
windowHeight = love.graphics.getHeight()
|
windowHeight = love.graphics.getHeight()
|
||||||
|
|
BIN
assets/gameover.png
Normal file
BIN
assets/gameover.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 76 KiB |
BIN
assets/gameover.psd
Normal file
BIN
assets/gameover.psd
Normal file
Binary file not shown.
|
@ -120,9 +120,13 @@ function GameScene:draw()
|
||||||
GameScene.bullets[y]:draw()
|
GameScene.bullets[y]:draw()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
love.graphics.draw(eSystem, currentPlayer.px, currentPlayer.py)
|
love.graphics.draw(eSystem, currentPlayer.px, currentPlayer.py)
|
||||||
|
|
||||||
|
local logoWidth = gameoverLogo:getWidth()
|
||||||
|
local logoHeight = gameoverLogo:getHeight()
|
||||||
|
love.graphics.setColor(1,1,1,GameScene.logoScale.a)
|
||||||
|
love.graphics.draw(gameoverLogo, (windowWidth - logoWidth) / 2, (windowHeight-logoHeight) / 2, 0, GameScene.logoScale.x, GameScene.logoScale.y )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -300,9 +304,15 @@ function GameScene:checkCollisions()
|
||||||
if cp == 0 then
|
if cp == 0 then
|
||||||
currentPlayer.death = true
|
currentPlayer.death = true
|
||||||
self:generateExplosion( currentPlayer.px, currentPlayer.py )
|
self:generateExplosion( currentPlayer.px, currentPlayer.py )
|
||||||
|
self:generateLogoEffect()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function GameScene:generateLogoEffect()
|
||||||
|
GameScene.logoScale = {x= 0.6, y= 0.6, a= 0}
|
||||||
|
flux.to(GameScene.logoScale, 0.5, {x= 1, y= 1, a= 1}):ease("quintout"):delay(0.5)
|
||||||
|
end
|
||||||
|
|
||||||
function GameScene:generateExplosion(px,py)
|
function GameScene:generateExplosion(px,py)
|
||||||
GameScene:generateExplosionSound(px,py)
|
GameScene:generateExplosionSound(px,py)
|
||||||
GameScene.explosionObj = {angle=100, radius=100}
|
GameScene.explosionObj = {angle=100, radius=100}
|
||||||
|
|
Loading…
Reference in a new issue