网上演练贵港万达广场(人员密集)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

34 lines
1.0 KiB

using System;
using System.Collections;
using System.Collections.Generic;
using AX.Network.Protocols;
using UnityEngine;
using AX.Serialization;
public class ROOM_DESTROY_SYNC : NetworkMessageBehaviour
{
protected override void Execute(BinaryMessage message)
{
var info = message.Body.Deserialize<Room>();
for (int i = 0; i < Lobby.roomList.Count; i++)
{
if (Lobby.roomList[i].Id == info.Id)
{
Lobby.roomList.Remove(Lobby.roomList[i]);
break;
}
}
GetComponent<GET_LOBBY_ROOMLIST_SYNC>().Bind(Lobby.roomList);
//房间被销毁,而之前选中了被销毁的房间,重置信息显示
if (LobbyDataManager.GetInstance.NowRoomId == info.Id)//如果当前正在浏览该房间信息
{
if (LobbyDataManager.GetInstance.MapImg.gameObject.activeSelf)//并且浏览界面可见重新绑定信息
{
LobbyDataManager.GetInstance.BindRoomMessage(null);
}
}
}
}