新增队伍系统,攻击不会打给同队,剩一队时游戏就结束(目前允许0~6,0号为自由队,每个人分别算一队)

添加/group命令来选择队伍
This commit is contained in:
MrZ_26
2022-10-26 01:26:04 +08:00
parent bd428f355a
commit 7d44396b03
9 changed files with 84 additions and 34 deletions

View File

@@ -142,6 +142,10 @@ function scene.keyDown(key,isRep)
if tonumber(cmd[2]) then NET.room_kick(tonumber(cmd[2])) end
elseif cmd[1]=='/host' then
if tonumber(cmd[2]) then NET.player_setHost(tonumber(cmd[2])) end
elseif cmd[1]=='/group' then
if tonumber(cmd[2]) and tonumber(cmd[2])%1==0 and tonumber(cmd[2])>=0 and tonumber(cmd[2])<=6 then
NET.player_joinGroup(tonumber(cmd[2]))
end
else
NET.textBox:push{COLOR.R,'Invalid command'}
end