调整软件锁进入方法

This commit is contained in:
MrZ626
2021-03-12 16:02:59 +08:00
parent d178140d7d
commit 12254b5849
7 changed files with 20 additions and 20 deletions

View File

@@ -275,7 +275,7 @@ return{
autoPause="Pause when focus is lost", autoPause="Pause when focus is lost",
swap="Key Combination (Change Atk. Mode)", swap="Key Combination (Change Atk. Mode)",
fine="Finesse Error Sound", fine="Finesse Error Sound",
appLock="App Lock (Password: 2+6)", appLock="App Lock (Password: 6+26)",
simpMode="Simple mode", simpMode="Simple mode",
}, },
setting_video={ setting_video={

View File

@@ -250,7 +250,7 @@ return{
autoPause="Mettre en pause en cas de perte de focus", autoPause="Mettre en pause en cas de perte de focus",
swap="Combinaison de touches (changer le mode d'attaque)", swap="Combinaison de touches (changer le mode d'attaque)",
fine="Son d'erreur de Finesse", fine="Son d'erreur de Finesse",
appLock="Verrouillage d'appli (MDP : 2+6)", appLock="Verrouillage d'appli (MDP : 6+26)",
-- simpMode="Simple mode", -- simpMode="Simple mode",
}, },
setting_video={ setting_video={

View File

@@ -275,7 +275,7 @@ return{
autoPause="Pausar quando foco for perco", autoPause="Pausar quando foco for perco",
swap="Combinação de tecla(Mudar modo de atk)", swap="Combinação de tecla(Mudar modo de atk)",
fine="Som Falha de destreza", fine="Som Falha de destreza",
appLock="App Lock (Senha: 2+6)", appLock="App Lock (Senha: 6+26)",
-- simpMode="Simple mode", -- simpMode="Simple mode",
}, },
setting_video={ setting_video={

View File

@@ -255,7 +255,7 @@ return{
autoPause="Pausar cuando la ventana no está enfocada", autoPause="Pausar cuando la ventana no está enfocada",
swap="Combinación de Teclas (Cambiar Modo de Ataque)", swap="Combinación de Teclas (Cambiar Modo de Ataque)",
fine="Sonido de Error de Finesse", fine="Sonido de Error de Finesse",
appLock="Bloqueo de App (Contraseña: 2+6)", appLock="Bloqueo de App (Contraseña: 6+26)",
-- simpMode="Simple mode", -- simpMode="Simple mode",
}, },
setting_video={ setting_video={

View File

@@ -135,7 +135,7 @@ return{
autoPause="A||", autoPause="A||",
swap="=+=+=", swap="=+=+=",
fine="12 X 21", fine="12 X 21",
appLock="?XX(=2+6)", appLock="?XX(=6+26)",
simpMode=".", simpMode=".",
}, },
setting_video={ setting_video={

View File

@@ -276,7 +276,7 @@ return{
autoPause="失去焦点自动暂停", autoPause="失去焦点自动暂停",
swap="组合键切换攻击模式", swap="组合键切换攻击模式",
fine="极简操作提示音", fine="极简操作提示音",
appLock="软件锁(密码2+6)", appLock="软件锁(密码6+26)",
simpMode="简洁模式", simpMode="简洁模式",
}, },
setting_video={ setting_video={

View File

@@ -18,9 +18,16 @@ for i=0,26 do
table.insert(light,660-i%9*60) table.insert(light,660-i%9*60)
table.insert(light,false) table.insert(light,false)
end end
light[math.random(10,18)*3]=true for _=1,3 do
light[math.random(19,25)*3]=true light[math.random(7,25)*3]=true
light[26*3]=true end
local function switchLight(i)
light[3*i]=not light[3*i]
if light[6*3]and light[26*3]then
locked=false
skip=0
end
end
local function upFloor() local function upFloor()
progress=progress+1 progress=progress+1
@@ -201,6 +208,7 @@ function scene.sceneInit()
skip=0--Skip time skip=0--Skip time
locked=SETTING.appLock locked=SETTING.appLock
cmdLaunchKey=0 cmdLaunchKey=0
if not locked then light[6*3],light[26*3]=true,true end
kb.setKeyRepeat(false) kb.setKeyRepeat(false)
end end
function scene.sceneBack() function scene.sceneBack()
@@ -214,13 +222,8 @@ function scene.keyDown(key)
skip=999 skip=999
elseif key=="r"then elseif key=="r"then
cmdLaunchKey=cmdLaunchKey+1 cmdLaunchKey=cmdLaunchKey+1
elseif locked and("12345679"):match(key,nil,false)then elseif locked and key:byte()>=97 and key:byte()<=122 then
key=tonumber(key) switchLight(key:byte()-96)
light[3*key]=not light[3*key]
if light[6]and light[18]then
locked=false
skip=0
end
else else
skip=skip+1 skip=skip+1
end end
@@ -229,10 +232,7 @@ function scene.mouseDown(x,y)
if locked then if locked then
for i=1,27 do for i=1,27 do
if(x-light[3*i-2])^2+(y-light[3*i-1])^2<=626 then if(x-light[3*i-2])^2+(y-light[3*i-1])^2<=626 then
light[3*i]=not light[3*i] switchLight(i)
if light[6]and light[18]then
locked=false
end
return return
end end
end end