退出前会主动断开一下ws连接
WAIT放到网络相关TASK函数内部(会在第一帧触发,不影响) 可以从语言文件翻译服务器的错误消息并显示了 框架跟进
This commit is contained in:
@@ -9,7 +9,7 @@ function scene.sceneInit()
|
||||
sysAndScn=SYSTEM.."-"..VERSION.string.." scene:"..Z.getErr('#').scene
|
||||
errorText=LOADED and text.errorMsg or "An error has occurred while the game was loading.\nAn error log has been created so you can send it to the author."
|
||||
errorShot,errorInfo=Z.getErr('#').shot,Z.getErr('#').mes
|
||||
NET.closeWS()
|
||||
NET.ws.close()
|
||||
if SETTING then
|
||||
SFX.fplay('error',SETTING.voc*.8 or 0)
|
||||
end
|
||||
|
||||
@@ -239,7 +239,7 @@ end
|
||||
|
||||
function scene.update(dt)
|
||||
if WS.status('game')~='running' then
|
||||
NET.closeWS()
|
||||
NET.ws.close()
|
||||
SCN.back()
|
||||
return
|
||||
end
|
||||
|
||||
@@ -4,7 +4,7 @@ function scene.sceneInit()
|
||||
BG.set()
|
||||
end
|
||||
function scene.sceneBack()
|
||||
NET.closeWS()
|
||||
NET.ws.close()
|
||||
end
|
||||
|
||||
function scene.draw()
|
||||
@@ -24,7 +24,7 @@ scene.widgetList={
|
||||
USER.__data.password=false
|
||||
USER.__data.rToken=false
|
||||
USER.__data.aToken=false
|
||||
NET.closeWS()
|
||||
NET.ws.close()
|
||||
SCN.back()
|
||||
end
|
||||
end},
|
||||
|
||||
Reference in New Issue
Block a user