整理代码,修复一些联网问题

This commit is contained in:
MrZ626
2021-04-09 02:27:16 +08:00
parent 2b723bd094
commit 4c3219688b
3 changed files with 3 additions and 6 deletions

View File

@@ -845,10 +845,10 @@ function textBox:update()
end
function textBox:push(t)
ins(self.texts,t)
if self.scrollPos==#self.texts-1 and not(self.hide==true or self.hide and self.hide())then
if self.scrollPos==#self.texts-1 then
self.scrollPos=#self.texts
else
SFX.play("spin_0",.8)
SFX.play("spin_0",.6)
self.new=true
end
end

View File

@@ -56,7 +56,7 @@ local function _parse(res)
)or
"[NO Message]"
),
"warning")
"warn")
end
end
end

View File

@@ -145,9 +145,6 @@ function scene.socketRead(cmd,d)
COLOR.dY,"#"..d.uid.." ",
COLOR.Y,text.leaveRoom,
}
if not playing then
initPlayerPosition(true)
end
elseif cmd=="Talk"then
textBox:push{
COLOR.W,d.username,