From d5f7a6ddd0d4b421850bae0e8556913bc78a948b Mon Sep 17 00:00:00 2001 From: MrZ_26 <1046101471@qq.com> Date: Thu, 27 Oct 2022 01:43:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/netPlayer.lua | 2 +- parts/scenes/net_game.lua | 17 +++-------------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/parts/netPlayer.lua b/parts/netPlayer.lua index 96a46c60..d6b663ab 100644 --- a/parts/netPlayer.lua +++ b/parts/netPlayer.lua @@ -72,7 +72,7 @@ local nullIndex={ NETPLY.add{ uid=k, group=-1, - role='Normal',-- 'Normal'|'Admin' + role='Normal', playMode='Spectator', readyMode='Standby', config="", diff --git a/parts/scenes/net_game.lua b/parts/scenes/net_game.lua index cd4dd6b9..578823a3 100644 --- a/parts/scenes/net_game.lua +++ b/parts/scenes/net_game.lua @@ -19,13 +19,6 @@ local upstreamProgress local noTouch,noKey=false,false local touchMoveLastFrame=false -local function _hideReadyUI() - return - playing or - NET.roomState.start or - TASK.getLock('ready') -end - local function _setCancel() if NETPLY.map[USER.uid].playMode=='Gamer' then NET.player_setReady(false) @@ -166,7 +159,7 @@ function scene.keyDown(key,isRep) PLAYERS[1]:pressKey(k) VK.press(k) end - elseif not _hideReadyUI() then + elseif not playing then if key=='space' then if NETPLY.map[USER.uid].playMode=='Spectator' or NETPLY.map[USER.uid].readyMode=='Ready' then _setCancel() @@ -307,10 +300,6 @@ function scene.draw() if NET.roomState.private then gc_draw(IMG.lock,30,668) end - if NET.roomState.start then - gc_setColor(0,1,0) - gc_print(text.started,230,655) - end -- Profile drawSelfProfile() @@ -327,8 +316,8 @@ function scene.draw() gc_print("M",430,10) end end -local function _hideF_ready() return _hideReadyUI() or (NETPLY.map[USER.uid].playMode=='Spectator' or NETPLY.map[USER.uid].readyMode=='Ready') end -local function _hideF_standby() return _hideReadyUI() or not (NETPLY.map[USER.uid].playMode=='Spectator' or NETPLY.map[USER.uid].readyMode=='Ready') end +local function _hideF_ready() return playing or (NETPLY.map[USER.uid].playMode=='Spectator' or NETPLY.map[USER.uid].readyMode=='Ready') end +local function _hideF_standby() return playing or not (NETPLY.map[USER.uid].playMode=='Spectator' or NETPLY.map[USER.uid].readyMode=='Ready') end scene.widgetList={ textBox, inputBox,