整理代码,把旧的wsWrite函数先改成新的WS.send,非最终稿

This commit is contained in:
MrZ626
2021-02-22 01:10:25 +08:00
parent 7d90a4dcfc
commit a8119bc9dd
4 changed files with 11 additions and 13 deletions

View File

@@ -8,7 +8,7 @@ local lastCreateRoomTime=0
local function enterRoom(roomID)
--[[TODO
wsWrite("???",json.encode{
WS.connect("play","/play",json.encode{
email=USER.email,
token=USER.access_token,
id=roomID,
@@ -21,7 +21,7 @@ local function fresh()
lastfreshTime=TIME()
rooms=nil
--[[TODO
wsWrite("???",json.encode{
WS.connect("play","/play",json.encode{
email=USER.email,
access_token=USER.access_token,
})
@@ -48,7 +48,7 @@ function scene.keyDown(k)
elseif k=="n"then
if TIME()-lastCreateRoomTime>26 then
--[[TODO
wsWrite("???",json.encode{
WS.send("room",json.encode{
email=USER.email,
access_token=USER.access_token,
room_name=(USER.name or"???").."'s room",