修复pc练习模式可以在场地未出现时落块

This commit is contained in:
MrZ626
2021-05-27 10:28:36 +08:00
parent 4f865374c5
commit dc2abfe043
2 changed files with 10 additions and 18 deletions

View File

@@ -5,15 +5,11 @@ local PCbase=require"parts.modes.PCbase"
local PClist=require"parts.modes.PClist" local PClist=require"parts.modes.PClist"
local function task_PC(P) local function task_PC(P)
local D=P.modeData P.control=false
while true do for _=1,26 do YIELD()end
YIELD() P.control=true
D.counter=D.counter+1 local base=PCbase[P.modeData.type]
if D.counter==26 then P:pushLineList(base[P.holeRND:random(#base)],P.modeData.symmetry)
local base=PCbase[D.type]
P:pushLineList(base[P.holeRND:random(#base)],D.symmetry)
end
end
end end
local function check(P) local function check(P)
local f=P.field local f=P.field

View File

@@ -8,15 +8,11 @@ local PCtype={
1,2,3, 1,2,3,
} }
local function task_PC(P) local function task_PC(P)
local D=P.modeData P.control=false
while true do for _=1,26 do YIELD()end
D.counter=D.counter+1 P.control=true
if D.counter==26 then local base=PCbase[P.modeData.type]
local base=PCbase[D.type] P:pushLineList(base[P.holeRND:random(#base)],P.modeData.symmetry)
P:pushLineList(base[P.holeRND:random(#base)],D.symmetry)
end
YIELD()
end
end end
local function check(P) local function check(P)
local r=P.field local r=P.field