2021-12-19 23:16:19 +01:00
|
|
|
|
|
|
|
local splash1Image = gfx.CreateSkinImage('titlescreen/splash/splash1.png', 0);
|
|
|
|
|
2021-12-20 15:38:54 +01:00
|
|
|
local splashTimer = 5;
|
|
|
|
|
|
|
|
game.LoadSkinSample('titlescreen/splash/splash1.wav');
|
|
|
|
local splash1SfxPlayed = false;
|
2021-12-19 23:16:19 +01:00
|
|
|
|
|
|
|
render = function (deltaTime)
|
|
|
|
gfx.BeginPath();
|
|
|
|
gfx.ImageRect(0, 0, 1080, 1920, splash1Image, 1, 0);
|
|
|
|
|
|
|
|
splashTimer = splashTimer - deltaTime
|
|
|
|
|
2021-12-20 15:38:54 +01:00
|
|
|
if (not splash1SfxPlayed) then
|
|
|
|
splash1SfxPlayed = true;
|
|
|
|
game.PlaySample('titlescreen/splash/splash1.wav');
|
|
|
|
end
|
|
|
|
|
2021-12-19 23:16:19 +01:00
|
|
|
if (splashTimer < 0) then
|
2021-12-20 15:38:54 +01:00
|
|
|
splash1SfxPlayed = false;
|
|
|
|
splashTimer = 5;
|
2021-12-19 23:16:19 +01:00
|
|
|
return {
|
|
|
|
eventType = 'switch',
|
|
|
|
toScreen = 'mode_select'
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
return {
|
|
|
|
render = render
|
|
|
|
}
|