整理代码

This commit is contained in:
MrZ626
2021-04-06 00:43:10 +08:00
parent eb15bec707
commit 3b5d21fcd4
5 changed files with 4 additions and 10 deletions

View File

@@ -73,7 +73,7 @@ if type(_CC)=="table"then
end
CC.updateField(P)
while P.holdQueue[1]do rem(P.holdQueue)end
TABLE.clear(P.holdQueue)
P.holdTime=P.gameEnv.holdCount
P.cur=rem(P.nextQueue,1)

View File

@@ -537,9 +537,7 @@ function destroyPlayers()--Destroy all player objects, restore freerows and free
end
PLAYERS[i]=nil
end
for i=#PLY_ALIVE,1,-1 do
PLY_ALIVE[i]=nil
end
TABLE.clear(PLY_ALIVE)
collectgarbage()
end
function restoreVirtualkey()

View File

@@ -1725,7 +1725,7 @@ function Player:lose(force)
if self.AI_mode=="CC"then
CC.destroy(self.AI_bot)
while self.holdQueue[1]do rem(self.holdQueue)end
TABLE.clear(self.holdQueue)
self:loadAI(self.AIdata)
end

View File

@@ -36,7 +36,7 @@ function scene.sceneInit()
end
local function clearResult()
for _=1,#result do rem(result)end
TABLE.clear(result)
selected,scrollPos=1,0
waiting,lastSearch=0,false
end

View File

@@ -14,7 +14,6 @@ local PLY_NET=PLY_NET
local hideChatBox
local textBox=WIDGET.newTextBox{name="texts",x=340,y=80,w=600,h=550,hide=function()return hideChatBox end}
local playerInitialized
local playing
local lastUpstreamTime
local upstreamProgress
@@ -31,16 +30,13 @@ end
function scene.sceneInit()
love.keyboard.setKeyRepeat(false)
hideChatBox=true
playerInitialized=false
textBox:clear()
while #PLY_NET>0 do rem(PLY_NET)end
resetGameData("n")
noTouch=not SETTING.VKSwitch
playing=false
lastUpstreamTime=0
upstreamProgress=1
heartBeatTimer=0
end
function scene.touchDown(x,y)