zxl
/
CTT
forked from Cal/CTT
1
0
Fork 0
CTT/Server/Model/Game/Entity/User/Team.cs

48 lines
1.1 KiB
C#
Executable File

using System;
using System.Collections.Generic;
using System.Text;
namespace ET
{
public enum TeamRequstType
{
Request,
Invite
}
public enum TeamState
{
None,
Fight,
Transfer
}
public enum TeamType
{
Self,
Target,
}
public class Team:Entity
{
public long LeaderId { get; set; }
public int MemberCount => teamMemberList.Count;
public TeamState TeamState { get; set; }
//public Dictionary<long, Unit> teamMemberDic = new Dictionary<long, Unit>();
public List<long> teamMemberIds = new List<long>();
public HashSet<Unit> offLineUnits = new HashSet<Unit>();
public HashSet<long> voteList = new HashSet<long>();
public LinkedList<Unit> teamMemberList = new();
public override string ToString()
{
string name = null;
foreach (Unit u in teamMemberList)
{
name += $"【{ UserComponent.Instance.Get(u.Id)?.NickName}({u.Id})】";
}
return name;
}
}
}