网上演练贵港万达广场(人员密集)
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.
 
 
 

59 lines
1.5 KiB

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Room
{
//房间ID
public long Id;
//房间名
public string Name;
//房间密码
public string Password;
//房主:房间创建者
public UserData Owner;
//包括场景类型,具体单位场景;(如化工建筑,DongYouLiQing);房间单位地图缩略图也根据单位场景名加载
public MapType Map;
//房间介绍
public string Introduction;
//创建时间
public string CreateTime;
//房间用户列表
public List<UserData> UserList = new List<UserData>();
//是否开始演练
public bool IsDrillStart;
//房间最大人数
public int MaxPersons;
//该房间是演习模式下还是练习模式下创建的
public Mode Mode;
public UserData FindUserById(long userId)
{
for (int i = 0; i < UserList.Count; i++)
{
if (UserList[i].UserInfo.Id==userId)
{
return UserList[i];
}
}
return null;
}
/// <summary>
/// 根据中队名称获取中队
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
public UserData FindMidTeamUserIDByName(string name)
{
for(int i = 0; i < UserList.Count; i++)
{
if(UserList[i].Org.DisplayName == name && UserList[i].Org.Level == 4)
{
return UserList[i];
}
}
return null;
}
}