所有小游戏入口移至词典

This commit is contained in:
MrZ626
2020-12-14 22:33:36 +08:00
parent e2c29aabf8
commit 1f070f78e6
8 changed files with 53 additions and 60 deletions

View File

@@ -220,7 +220,6 @@ return{
quit="Exit",
music="Music Room",
sound="SE Room",
minigame="Mini Games",
},
mode={
mod="Mods (F1)",
@@ -584,14 +583,6 @@ return{
b3b="B3B",
pc="PC",
},
minigame={
mg_15p="15 Puzzle",
mg_schulteG="Schulte Grid",
mg_pong="Pong",
mg_AtoZ="A to Z",
mg_UTTT="Ultimate Tic-Tac-Toe",
mg_cubefield="Cubefield",
},
mg_15p={
reset="Shuffle",
color="Color",

View File

@@ -199,7 +199,6 @@ return{
quit="Quitter",
music="Salon musical",
sound="Salon SE",
minigame="Minijeux",
},
mode={
-- mod="Mods (F1)",
@@ -558,14 +557,6 @@ return{
b3b="B3B",
pc="PC",
},
minigame={
mg_15p="15 Puzzle",
mg_schulteG="Grille de Schulte",
mg_pong="Pong",
-- mg_AtoZ="A to Z",
-- mg_UTTT="Ultimate Tic-Tac-Toe",
-- mg_cubefield="Cubefield",
},
mg_15p={
reset="Réinitialiser",
color="Couleur",

View File

@@ -203,7 +203,6 @@ return{
quit="Salir",
music="Música",
sound="Sala de SE",
minigame="Minijuegos",
},
mode={
-- mod="Mods (F1)",
@@ -564,14 +563,6 @@ return{
-- b3b="B3B",
-- pc="PC",
},
minigame={
mg_15p="Puzzle-15",
mg_schulteG="Grilla Schulte",
mg_pong="Pong",
-- mg_AtoZ="A to Z",
-- mg_UTTT="Ultimate Tic-Tac-Toe",
-- mg_cubefield="Cubefield",
},
mg_15p={
reset="Mezclar",
color="Color",

View File

@@ -110,7 +110,6 @@ return{
quit="X",
music="~~~",
sound="=><=",
minigame="^_^",
},
mode={
mod="?!?!?!(F1)",

View File

@@ -223,7 +223,6 @@ return{
quit="退出",
music="音乐室",
sound="音效室",
minigame="小游戏",
},
mode={
mod="Mods (F1)",
@@ -585,14 +584,6 @@ return{
b3b="B3B",
pc="PC",
},
minigame={
mg_15p="15 Puzzle",
mg_schulteG="舒尔特方格",
mg_pong="Pong",
mg_AtoZ="A to Z",
mg_UTTT="战略井字棋",
mg_cubefield="Cubefield",
},
mg_15p={
reset="打乱",
color="颜色",

View File

@@ -143,14 +143,6 @@ return{
b3b="大满贯",
pc="全清",
},
minigame={
mg_15p="数字华容道",
mg_schulteG="舒尔特方格",
mg_pong="弹球",
mg_AtoZ="打字游戏",
mg_UTTT="战略井字棋",
mg_cubefield="飞行器",
},
},
modes={
["sprint_10"]= {"竞速", "10行", "消除10行"},

View File

@@ -39,23 +39,62 @@ local function clearResult()
for _=1,#result do rem(result)end
selected,scrollPos,waiting,lastSearch=1,0,0,false
end
local miniGame={
["15"]="15p",
["15p"]="15p",
hrd="15p",
huarongdao="15p",
shuzihuarongdao="15p",
schulte="schulteG",
schulteg="schulteG",
schultegrid="schulteG",
shuerte="schulteG",
shuertefangge="schulteG",
ping="pong",
pong="pong",
tanqiu="pong",
abc="AtoZ",
abcde="AtoZ",
abcdefg="AtoZ",
atoz="AtoZ",
AtoZ="AtoZ",
dazi="AtoZ",
uttt="UTTT",
tictactoe="UTTT",
ultimatetictactoe="UTTT",
ultimateTicTacToe="UTTT",
jingziqi="UTTT",
zhanluejingziqi="UTTT",
cf="cubefield",
cbfd="cubefield",
cubefield="cubefield",
}
local function search()
clearResult()
local first
for i=1,#dict do
local pos=find(dict[i][2],input,nil,true)
if pos==1 and not first then
ins(result,1,dict[i])
first=true
elseif pos then
ins(result,dict[i])
if miniGame[input]then
SCN.go("mg_"..miniGame[input])
else
clearResult()
local first
for i=1,#dict do
local pos=find(dict[i][2],input,nil,true)
if pos==1 and not first then
ins(result,1,dict[i])
first=true
elseif pos then
ins(result,dict[i])
end
end
if result[1]then
SFX.play("reach")
end
url=(result[1]and result or dict)[selected][5]
lastSearch=input
end
if result[1]then
SFX.play("reach")
end
url=(result[1]and result or dict)[selected][5]
lastSearch=input
end
function scene.keyDown(key)

View File

@@ -118,7 +118,6 @@ scene.widgetList={
WIDGET.newButton{name="quit", x=590,y=515,w=200,h=90,color="grey", font=40,code=function()VOC.play("bye")SCN.swapTo("quit","slowFade")end},
WIDGET.newKey{name="music", x=150,y=610,w=200,h=60,color="red", code=WIDGET.lnk_goScene("music")},
WIDGET.newKey{name="sound", x=370,y=610,w=200,h=60,color="green", code=WIDGET.lnk_goScene("sound")},
WIDGET.newKey{name="minigame", x=590,y=610,w=200,h=60,color="blue", code=WIDGET.lnk_goScene("minigame")},
}
return scene