+ title screen to titlescreen (fuck)
This commit is contained in:
parent
634c85436c
commit
ae7b9d8824
|
@ -1,4 +1,5 @@
|
|||
local splashScreen = require('titlescreen.splash');
|
||||
local titleScreen = require('titlescreen.title');
|
||||
local modeSelectScreen = require('titlescreen.mode_select');
|
||||
local serviceScreen = require('titlescreen.service');
|
||||
|
||||
|
@ -6,6 +7,9 @@ local screens = {
|
|||
splash = {
|
||||
screen = splashScreen
|
||||
},
|
||||
title = {
|
||||
screen = titleScreen
|
||||
},
|
||||
mode_select = {
|
||||
screen = modeSelectScreen
|
||||
},
|
||||
|
|
|
@ -22,7 +22,7 @@ render = function (deltaTime)
|
|||
splashTimer = 5;
|
||||
return {
|
||||
eventType = 'switch',
|
||||
toScreen = 'mode_select'
|
||||
toScreen = 'title'
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
|
||||
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
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 668 KiB |
Loading…
Reference in New Issue