简化进入控制台的方法
This commit is contained in:
@@ -11,16 +11,14 @@ local widgetX0={
|
|||||||
-10,-10,-10,-10,
|
-10,-10,-10,-10,
|
||||||
1290,1290,1290,1290,
|
1290,1290,1290,1290,
|
||||||
}
|
}
|
||||||
|
|
||||||
local cmdEntryThread=coroutine.wrap(function()
|
local cmdEntryThread=coroutine.wrap(function()
|
||||||
while true do
|
while true do
|
||||||
if
|
SFX.play("ren_"..math.random(5,6))YIELD()
|
||||||
YIELD()=="c"and(SFX.play("ren_6")or 1)and
|
SFX.play("ren_"..math.random(7,8))YIELD()
|
||||||
YIELD()=="m"and(SFX.play("ren_9")or 1)and
|
SFX.play("ren_"..math.random(9,10))YIELD()
|
||||||
YIELD()=="d"and(SFX.play("ren_11")or 1)
|
SFX.play("ren_9")SFX.play("ren_11")SFX.play("ren_mega")
|
||||||
then
|
SCN.go("app_cmd")
|
||||||
SCN.go("app_cmd")
|
YIELD()
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
function scene.sceneInit()
|
function scene.sceneInit()
|
||||||
@@ -28,7 +26,6 @@ function scene.sceneInit()
|
|||||||
scrollX=tipLength
|
scrollX=tipLength
|
||||||
|
|
||||||
BG.set()
|
BG.set()
|
||||||
cmdEntryThread()
|
|
||||||
|
|
||||||
--Set quick-play-button text
|
--Set quick-play-button text
|
||||||
scene.widgetList[2]:setObject(text.WidgetText.main.qplay..": "..text.modes[STAT.lastPlay][1])
|
scene.widgetList[2]:setObject(text.WidgetText.main.qplay..": "..text.modes[STAT.lastPlay][1])
|
||||||
@@ -42,12 +39,8 @@ function scene.sceneInit()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function scene.mouseDown(x,y)
|
function scene.mouseDown(x,y)
|
||||||
if x>=520 and x<=760 and y>=140 and y<=620 then
|
if x>=400 and x<=880 and y>=10 and y<=110 then
|
||||||
cmdEntryThread(
|
cmdEntryThread()
|
||||||
x<520+80 and y>620-80 and"c"or
|
|
||||||
x>760-80 and y>620-80 and"m"or
|
|
||||||
x<520+80 and y<140+80 and"d"
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
scene.touchDown=scene.mouseDown
|
scene.touchDown=scene.mouseDown
|
||||||
@@ -122,8 +115,8 @@ function scene.keyDown(key)
|
|||||||
if testButton(12)then
|
if testButton(12)then
|
||||||
SCN.back()
|
SCN.back()
|
||||||
end
|
end
|
||||||
else
|
elseif key=="c"then
|
||||||
cmdEntryThread(key)
|
cmdEntryThread()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user