整 理 代 码
(应该没有改到字符串里面的东西吧…)起码不直接影响运行
This commit is contained in:
@@ -12,7 +12,7 @@ local scene={}
|
||||
|
||||
local function newNum(lv)
|
||||
local num=""
|
||||
for _=1,4+lv^.66 do num=num..math.random(0,9)end
|
||||
for _=1,4+lv^.66 do num=num..math.random(0,9) end
|
||||
return num
|
||||
end
|
||||
|
||||
@@ -40,15 +40,15 @@ end
|
||||
|
||||
function scene.keyDown(key,isRep)
|
||||
if isRep then return end
|
||||
if key=='escape'then
|
||||
if tryBack()then
|
||||
if key=='escape' then
|
||||
if tryBack() then
|
||||
SCN.back()
|
||||
end
|
||||
elseif key=='r'then
|
||||
elseif key=='r' then
|
||||
_reset()
|
||||
elseif state==0 then
|
||||
if key:sub(1,2)=="kp"then key=key:sub(3)end
|
||||
if #key==1 and("0123456789"):find(key,nil,true)then
|
||||
if key:sub(1,2)=="kp" then key=key:sub(3) end
|
||||
if #key==1 and ("0123456789"):find(key,nil,true) then
|
||||
input=input..key
|
||||
showTime=math.min(showTime,0)
|
||||
if input==showNum then
|
||||
@@ -56,7 +56,7 @@ function scene.keyDown(key,isRep)
|
||||
freshLevel()
|
||||
SFX.play('reach')
|
||||
end
|
||||
elseif key=='space'or key=='backspace'then
|
||||
elseif key=='space' or key=='backspace' then
|
||||
input=""
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user