Compatibility (0.10 -> 11.x): - love.audio.newSource now requires a source type argument - love.graphics.setColor uses 0-1 range instead of 0-255 (stress overlay and MessageInABottle text/background/alpha) - love.keyboard.isDown space key is "space", not " " - conf.lua version bumped to 11.5 Content: - Translate all in-game texts to Spanish - Prepend control instructions to the welcome message - Add the missing cap5stage text (bra reflection) - Show endgood/endbad texts on the final screen Bug fixes: - stage7 crashed on the bad ending: music2 was only set on the good branch, guard the play() call - stress overlay leaked its faded color; restore full color after draw
43 lines
1.2 KiB
Lua
43 lines
1.2 KiB
Lua
local anim8 = require 'assets/scripts/vendor/anim8'
|
|
local tools = require 'assets/scripts/tools'
|
|
local arrows = require 'assets/scripts/arrows'
|
|
local messages = require 'assets/scripts/messages'
|
|
|
|
local stage7 = {}
|
|
local image
|
|
|
|
function stage7.load(game, camera)
|
|
if game.status == 9 then
|
|
image = love.graphics.newImage('assets/sprites/background/final bueno_3.jpg')
|
|
stage7.music = love.audio.newSource("assets/audio/fx/door_win.wav", "static")
|
|
stage7.music2 = love.audio.newSource("assets/audio/music/our_song_end.mp3", "stream")
|
|
messages.new_message('endgood', 60)
|
|
else
|
|
image = love.graphics.newImage('assets/sprites/background/dead.jpg')
|
|
stage7.music = love.audio.newSource("assets/audio/fx/door_lose.wav", "static")
|
|
messages.new_message('endbad', 15)
|
|
end
|
|
game:stopMusic()
|
|
stage7.world = { w = image:getWidth(), h= 720}
|
|
game:setNewSizeWorld(stage7.world.w, stage7.world.h)
|
|
arrows.load(game, stage7, camera)
|
|
game.canvas.x = game.window.width / 2
|
|
if stage7.music2 then
|
|
stage7.music2:play()
|
|
end
|
|
stage7.music:play()
|
|
|
|
|
|
end
|
|
|
|
function stage7.update(dt, game)
|
|
arrows.update(dt)
|
|
end
|
|
|
|
function stage7.draw()
|
|
love.graphics.draw(image)
|
|
arrows.draw()
|
|
end
|
|
|
|
return stage7
|