微调玩家准备相关交互
This commit is contained in:
@@ -422,21 +422,28 @@ function NET.updateWS_play()
|
|||||||
resetGameData("qn")
|
resetGameData("qn")
|
||||||
end
|
end
|
||||||
elseif res.action==6 then--One ready
|
elseif res.action==6 then--One ready
|
||||||
for i=1,#PLY_NET do
|
for i,p in next,PLY_NET do
|
||||||
if PLY_NET[i].uid==d.uid then
|
if p.uid==d.uid then
|
||||||
if PLY_NET[i].ready~=d.ready then
|
if p.ready~=d.ready then
|
||||||
|
p.ready=d.ready
|
||||||
|
SFX.play("spin_0",.6)
|
||||||
if i==1 then
|
if i==1 then
|
||||||
WIDGET.active.ready.color=COLOR[d.ready and"lY"or"lG"]
|
NET.unlock("ready")
|
||||||
|
else
|
||||||
|
for j=2,#PLY_NET do
|
||||||
|
if not PLY_NET[j].ready then
|
||||||
|
break
|
||||||
|
elseif j==#PLY_NET then
|
||||||
|
SFX.play("warning",.5)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
PLY_NET[i].ready=d.ready
|
|
||||||
SFX.play("reach",.6)
|
|
||||||
end
|
end
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
NET.unlock("ready")
|
|
||||||
elseif res.action==7 then--Ready
|
elseif res.action==7 then--Ready
|
||||||
--?
|
SFX.play("reach",.6)
|
||||||
elseif res.action==8 then--Set
|
elseif res.action==8 then--Set
|
||||||
NET.rsid=d.rid
|
NET.rsid=d.rid
|
||||||
NET.wsconn_stream()
|
NET.wsconn_stream()
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ function scene.draw()
|
|||||||
end
|
end
|
||||||
scene.widgetList={
|
scene.widgetList={
|
||||||
textBox,
|
textBox,
|
||||||
WIDGET.newKey{name="ready",x=900,y=560,w=400,h=100,color="lG",font=40,code=pressKey"space",hide=function()
|
WIDGET.newKey{name="ready",x=900,y=560,w=400,h=100,color="lB",font=40,code=pressKey"space",hide=function()
|
||||||
return
|
return
|
||||||
playing or
|
playing or
|
||||||
not textBox.hide or
|
not textBox.hide or
|
||||||
|
|||||||
Reference in New Issue
Block a user