整理代码
This commit is contained in:
@@ -73,7 +73,7 @@ if type(_CC)=="table"then
|
|||||||
end
|
end
|
||||||
CC.updateField(P)
|
CC.updateField(P)
|
||||||
|
|
||||||
while P.holdQueue[1]do rem(P.holdQueue)end
|
TABLE.clear(P.holdQueue)
|
||||||
P.holdTime=P.gameEnv.holdCount
|
P.holdTime=P.gameEnv.holdCount
|
||||||
|
|
||||||
P.cur=rem(P.nextQueue,1)
|
P.cur=rem(P.nextQueue,1)
|
||||||
|
|||||||
@@ -537,9 +537,7 @@ function destroyPlayers()--Destroy all player objects, restore freerows and free
|
|||||||
end
|
end
|
||||||
PLAYERS[i]=nil
|
PLAYERS[i]=nil
|
||||||
end
|
end
|
||||||
for i=#PLY_ALIVE,1,-1 do
|
TABLE.clear(PLY_ALIVE)
|
||||||
PLY_ALIVE[i]=nil
|
|
||||||
end
|
|
||||||
collectgarbage()
|
collectgarbage()
|
||||||
end
|
end
|
||||||
function restoreVirtualkey()
|
function restoreVirtualkey()
|
||||||
|
|||||||
@@ -1725,7 +1725,7 @@ function Player:lose(force)
|
|||||||
|
|
||||||
if self.AI_mode=="CC"then
|
if self.AI_mode=="CC"then
|
||||||
CC.destroy(self.AI_bot)
|
CC.destroy(self.AI_bot)
|
||||||
while self.holdQueue[1]do rem(self.holdQueue)end
|
TABLE.clear(self.holdQueue)
|
||||||
self:loadAI(self.AIdata)
|
self:loadAI(self.AIdata)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ function scene.sceneInit()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function clearResult()
|
local function clearResult()
|
||||||
for _=1,#result do rem(result)end
|
TABLE.clear(result)
|
||||||
selected,scrollPos=1,0
|
selected,scrollPos=1,0
|
||||||
waiting,lastSearch=0,false
|
waiting,lastSearch=0,false
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ local PLY_NET=PLY_NET
|
|||||||
local hideChatBox
|
local hideChatBox
|
||||||
local textBox=WIDGET.newTextBox{name="texts",x=340,y=80,w=600,h=550,hide=function()return hideChatBox end}
|
local textBox=WIDGET.newTextBox{name="texts",x=340,y=80,w=600,h=550,hide=function()return hideChatBox end}
|
||||||
|
|
||||||
local playerInitialized
|
|
||||||
local playing
|
local playing
|
||||||
local lastUpstreamTime
|
local lastUpstreamTime
|
||||||
local upstreamProgress
|
local upstreamProgress
|
||||||
@@ -31,16 +30,13 @@ end
|
|||||||
function scene.sceneInit()
|
function scene.sceneInit()
|
||||||
love.keyboard.setKeyRepeat(false)
|
love.keyboard.setKeyRepeat(false)
|
||||||
hideChatBox=true
|
hideChatBox=true
|
||||||
playerInitialized=false
|
|
||||||
textBox:clear()
|
textBox:clear()
|
||||||
|
|
||||||
while #PLY_NET>0 do rem(PLY_NET)end
|
|
||||||
resetGameData("n")
|
resetGameData("n")
|
||||||
noTouch=not SETTING.VKSwitch
|
noTouch=not SETTING.VKSwitch
|
||||||
playing=false
|
playing=false
|
||||||
lastUpstreamTime=0
|
lastUpstreamTime=0
|
||||||
upstreamProgress=1
|
upstreamProgress=1
|
||||||
heartBeatTimer=0
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function scene.touchDown(x,y)
|
function scene.touchDown(x,y)
|
||||||
|
|||||||
Reference in New Issue
Block a user