【不能用】继续改联网
框架跟进
This commit is contained in:
@@ -24,7 +24,7 @@ local function _hideReadyUI()
|
||||
return
|
||||
playing or
|
||||
NET.roomState.start or
|
||||
NET.getlock('ready')
|
||||
TASK.getLock('ready')
|
||||
end
|
||||
|
||||
local function _setCancel()NET.signal_setMode(0)end
|
||||
|
||||
@@ -61,14 +61,14 @@ function scene.sceneInit()
|
||||
end
|
||||
|
||||
function scene.keyDown(key)
|
||||
if NET.getlock('enterRoom')then return true end
|
||||
if TASK.getLock('enterRoom')then return true end
|
||||
if key=='r'then
|
||||
if fetchTimer<=7 then
|
||||
_fetchRoom()
|
||||
end
|
||||
elseif roomList:getLen()>0 and(key=='join'or key=='return'and love.keyboard.isDown('lctrl','rctrl'))then
|
||||
local R=roomList:getSel()
|
||||
if NET.getlock('fetchRoom')or not R then return end
|
||||
if TASK.getLock('fetchRoom')or not R then return end
|
||||
if R.roomInfo.version==VERSION.room then
|
||||
NET.enterRoom(R,passwordBox.value)
|
||||
else
|
||||
@@ -80,7 +80,7 @@ function scene.keyDown(key)
|
||||
end
|
||||
|
||||
function scene.update(dt)
|
||||
if not NET.getlock('fetchRoom')and _hidePW()then
|
||||
if not TASK.getLock('fetchRoom')and _hidePW()then
|
||||
fetchTimer=fetchTimer-dt
|
||||
if fetchTimer<=0 then
|
||||
_fetchRoom()
|
||||
@@ -94,7 +94,7 @@ function scene.draw()
|
||||
gc_arc('fill','pie',250,630,40,-1.5708,-1.5708-.6283*fetchTimer)
|
||||
|
||||
--Joining mark
|
||||
if NET.getlock('enterRoom')then
|
||||
if TASK.getLock('enterRoom')then
|
||||
gc.setColor(COLOR.Z)
|
||||
gc.setLineWidth(15)
|
||||
local t=TIME()*6.26%6.2832
|
||||
@@ -135,11 +135,11 @@ scene.widgetList={
|
||||
roomList,
|
||||
passwordBox,
|
||||
WIDGET.newKey{name='setting', x=1200,y=160,w=90,h=90,font=60,fText=CHAR.icon.settings,code=goScene'setting_game'},
|
||||
WIDGET.newText{name='refreshing',x=450,y=240,font=45,hideF=function()return not NET.getlock('fetchRoom')end},
|
||||
WIDGET.newText{name='noRoom', x=450,y=245,font=40,hideF=function()return roomList:getLen()>0 or NET.getlock('fetchRoom')end},
|
||||
WIDGET.newText{name='refreshing',x=450,y=240,font=45,hideF=function()return not TASK.getLock('fetchRoom')end},
|
||||
WIDGET.newText{name='noRoom', x=450,y=245,font=40,hideF=function()return roomList:getLen()>0 or TASK.getLock('fetchRoom')end},
|
||||
WIDGET.newKey{name='refresh', x=250,y=630,w=140,h=120,code=_fetchRoom,hideF=function()return fetchTimer>7 end},
|
||||
WIDGET.newKey{name='new', x=510,y=630,w=260,h=120,code=goScene'net_newRoom'},
|
||||
WIDGET.newKey{name='join', x=780,y=630,w=140,h=120,code=pressKey'join',hideF=function()return roomList:getLen()==0 or NET.getlock('enterRoom')end},
|
||||
WIDGET.newKey{name='join', x=780,y=630,w=140,h=120,code=pressKey'join',hideF=function()return roomList:getLen()==0 or TASK.getLock('enterRoom')end},
|
||||
WIDGET.newButton{name='back', x=1140,y=640,w=170,h=80,sound='back',font=60,fText=CHAR.icon.back,code=pressKey'escape'},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user