ExperimentalGear/scripts/titlescreen/title.lua

36 lines
847 B
Lua
Raw Normal View History

2021-12-21 19:39:34 +01:00
local splash1Image = gfx.CreateSkinImage('titlescreen/title/background.png', 0);
local triggerModeSelect = false;
-- game.LoadSkinSample('titlescreen/splash/splash1.wav');
-- local splash1SfxPlayed = false;
local render = function (deltaTime)
gfx.BeginPath();
gfx.ImageRect(0, 0, 1080, 1920, splash1Image, 1, 0);
-- if (not splash1SfxPlayed) then
-- splash1SfxPlayed = true;
-- game.PlaySample('titlescreen/splash/splash1.wav');
-- end
if (triggerModeSelect) then
triggerModeSelect = false;
return {
eventType = 'switch',
toScreen = 'mode_select'
}
end
end
local onButtonPressed = function(button)
if button == game.BUTTON_STA then
triggerModeSelect = true;
end
end
return {
render = render,
onButtonPressed = onButtonPressed
}