48 lines
1.1 KiB
C#
48 lines
1.1 KiB
C#
|
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 (var u in teamMemberList)
|
|||
|
{
|
|||
|
name += $"【{ UserComponent.Instance.Get(u.Id)?.NickName}({u.Id})】";
|
|||
|
}
|
|||
|
return name;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|