mirror of
https://gitea.com/SweetSea-ButImNotSweet/tromi_mobile.git
synced 2025-01-08 17:33:09 +08:00
Using Lily to speed up assets loading
This commit is contained in:
@@ -1,10 +1,21 @@
|
||||
local LoadingScene = SCENE:extend()
|
||||
local LoadingImageFile = love.graphics.newImage('res/loading.png')
|
||||
|
||||
function LoadingScene.update()
|
||||
SCENE = SETTINGS.firstTime and InputConfigScene(true) or TitleScene()
|
||||
if LOADED_BACKGROUND and LOADED_MUSIC then
|
||||
SCENE = SETTINGS.firstTime and InputConfigScene(true) or TitleScene()
|
||||
LILY.quit()
|
||||
end
|
||||
end
|
||||
function LoadingScene.render()
|
||||
love.graphics.draw(LOADING_IMAGE_FILE,0,0,0,0.5)
|
||||
love.graphics.draw(LoadingImageFile,0,0,0,0.5)
|
||||
drawText(
|
||||
("Background: %s\nMusic & SFX: %s"):format(
|
||||
LOADED_BACKGROUND and "loaded" or "...",
|
||||
LOADED_MUSIC and "loaded" or "..."
|
||||
),
|
||||
15, 440, 1e99, "left"
|
||||
)
|
||||
end
|
||||
|
||||
return LoadingScene
|
||||
Reference in New Issue
Block a user