diff --git a/Zframework/init.lua b/Zframework/init.lua index 924688c0..92152c92 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -511,6 +511,7 @@ function love.run() if SCN.swapping then SCN.swapUpdate()end--Scene swapping animation WIDGET.update()--Widgets animation LOG.update() + WS.update() --DRAW if not MINI()then diff --git a/parts/scenes/main.lua b/parts/scenes/main.lua index 830e65dd..9f90dd9c 100644 --- a/parts/scenes/main.lua +++ b/parts/scenes/main.lua @@ -44,6 +44,9 @@ function scene.sceneInit() PLY.newDemoPlayer(1) PLAYERS[1]:setPosition(520,140,.8) love.keyboard.setKeyRepeat(false) + + --Connect to server + TASK.new(TICK_WS_app) end function scene.sceneBack() love.keyboard.setKeyRepeat(true) @@ -81,7 +84,6 @@ function scene.keyDown(key) TEXT.show(text.notFinished,640,450,60,"flicker") SFX.play("finesseError") elseif LOGIN then - --[[TODO if USER.accessToken then WS.send("app",JSON.encode{ opration="access", @@ -92,10 +94,9 @@ function scene.keyDown(key) WS.send("app",JSON.encode{ opration="access", email=USER.email, - authToken=USER.authToken, + authToken=USER.authToken, }) end - ]] else SCN.go("login") end