mirror of
https://gitea.com/SweetSea-ButImNotSweet/tromi_mobile.git
synced 2025-01-08 17:33:09 +08:00
Compare commits
2 Commits
v.0.0.v.2.
...
v.0.1.v.2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e79bf246bf | ||
|
|
7cf450868a |
@@ -45,6 +45,8 @@ local buttonList = {
|
|||||||
local menuKey -- MENU key used to go main menu XD
|
local menuKey -- MENU key used to go main menu XD
|
||||||
|
|
||||||
function GameScene:new(player_name, replay_file, replay_grade)
|
function GameScene:new(player_name, replay_file, replay_grade)
|
||||||
|
VCTRL[9].show = false
|
||||||
|
|
||||||
menuKey = BUTTON.new{
|
menuKey = BUTTON.new{
|
||||||
text = "MENU",
|
text = "MENU",
|
||||||
x = 265, y = 0, w = 60, h = 25,
|
x = 265, y = 0, w = 60, h = 25,
|
||||||
@@ -130,7 +132,7 @@ end
|
|||||||
|
|
||||||
function GameScene:onInputPress(e)
|
function GameScene:onInputPress(e)
|
||||||
if e.type == "mouse" or (e.type == "touch" and not VCTRL.press(e.x, e.y, e.id)) then
|
if e.type == "mouse" or (e.type == "touch" and not VCTRL.press(e.x, e.y, e.id)) then
|
||||||
BUTTON.press(buttonList, e.x, e.y, e.id)
|
if self.game.input_playback then BUTTON.press(buttonList, e.x, e.y, e.id) end
|
||||||
menuKey:press(e.x, e.y, e.id)
|
menuKey:press(e.x, e.y, e.id)
|
||||||
elseif (self.game.game_over or self.game.completed) and (e.input == "menu_decide" or e.input == "menu_back" or e.input == "rotate_right") and self.game.game_over_frames > 50 then
|
elseif (self.game.game_over or self.game.completed) and (e.input == "menu_decide" or e.input == "menu_back" or e.input == "rotate_right") and self.game.game_over_frames > 50 then
|
||||||
SCENE = TitleScene()
|
SCENE = TitleScene()
|
||||||
@@ -171,7 +173,7 @@ end
|
|||||||
|
|
||||||
function GameScene:onInputRelease(e)
|
function GameScene:onInputRelease(e)
|
||||||
if e.type == "mouse" or (e.type == "touch" and not VCTRL.release(e.id)) then
|
if e.type == "mouse" or (e.type == "touch" and not VCTRL.release(e.id)) then
|
||||||
BUTTON.release(buttonList, e.x, e.y, e.id)
|
if self.game.input_playback then BUTTON.release(buttonList, e.x, e.y, e.id) end
|
||||||
menuKey:release(e.x, e.y, e.id)
|
menuKey:release(e.x, e.y, e.id)
|
||||||
elseif e.input and string.sub(e.input, 1, 5) ~= "menu_" then
|
elseif e.input and string.sub(e.input, 1, 5) ~= "menu_" then
|
||||||
self.inputs[e.input] = false
|
self.inputs[e.input] = false
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ local main_menu_screens = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function TitleScene:new()
|
function TitleScene:new()
|
||||||
|
VCTRL.clearAll() -- Reset the RESTART button state
|
||||||
|
VCTRL.new(SETTINGS.input.virtual)
|
||||||
if SOUNDS['bgm_firsthalf']:isPlaying() or SOUNDS['bgm_secondhalf']:isPlaying() or not SETTINGS["music"] then
|
if SOUNDS['bgm_firsthalf']:isPlaying() or SOUNDS['bgm_secondhalf']:isPlaying() or not SETTINGS["music"] then
|
||||||
love.audio.stop()
|
love.audio.stop()
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ function TrainingScene:onInputPress(e)
|
|||||||
SCENE = TitleScene()
|
SCENE = TitleScene()
|
||||||
elseif (e.input == "menu_back") then
|
elseif (e.input == "menu_back") then
|
||||||
SCENE = TitleScene()
|
SCENE = TitleScene()
|
||||||
|
elseif e.input == "restart" or e.input == "menu_decide" then
|
||||||
|
SCENE = TrainingScene()
|
||||||
elseif e.input and string.sub(e.input, 1, 5) ~= "menu_" then
|
elseif e.input and string.sub(e.input, 1, 5) ~= "menu_" then
|
||||||
self.inputs[e.input] = true
|
self.inputs[e.input] = true
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -25,8 +25,7 @@ local _defaultSettings = {
|
|||||||
{type='button',x=640-145,y=355,key= 'rotate_left2',r=45,iconSize=60,alpha=0.4},
|
{type='button',x=640-145,y=355,key= 'rotate_left2',r=45,iconSize=60,alpha=0.4},
|
||||||
{type='button',x=640- 70,y=430,key= 'rotate_right',r=45,iconSize=60,alpha=0.4},
|
{type='button',x=640- 70,y=430,key= 'rotate_right',r=45,iconSize=60,alpha=0.4},
|
||||||
{type='button',x=640- 70,y=280,key='rotate_right2',r=45,iconSize=60,alpha=0.4},
|
{type='button',x=640- 70,y=280,key='rotate_right2',r=45,iconSize=60,alpha=0.4},
|
||||||
{type='button',x=320- 40,y=420,key= 'menu_decide',r=35,iconSize=60,alpha=0.4},
|
{type='button',x=320, y=420,key= 'restart',r=35,iconSize=60,alpha=0.4},
|
||||||
{type='button',x=320+ 40,y=420,key= 'menu_back',r=35,iconSize=60,alpha=0.4},
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tvMode = false -- 79338732
|
tvMode = false -- 79338732
|
||||||
|
|||||||
Reference in New Issue
Block a user