联网对战(初版,不可用)

This commit is contained in:
MrZ626
2021-01-29 01:28:55 +08:00
parent c8f4faaa95
commit 2cc74ea946
7 changed files with 167 additions and 84 deletions

View File

@@ -38,8 +38,7 @@ local function task_enterRoom(task)
local wsconn,connErr=client.poll(task)
if wsconn then
WSCONN=wsconn
SCN.go("net_game")
loadGame("sprint_40l")
loadGame("netBattle",true,true)
LOG.print(text.wsSuccessed,"warn")
return
elseif connErr then
@@ -103,6 +102,10 @@ function scene.keyDown(k)
end
end
elseif k=="return"then
if rooms[selected].private then
LOG.print("Can't enter private room now")
return
end
wsConnect(
task_enterRoom,
PATH.socket..PATH.play_room..