[+] 接入ET8服务端

[+] 接入ET8服务端
This commit is contained in:
ALEXTANG
2023-07-13 12:23:48 +08:00
parent e0be062006
commit 336d4b2eb9
1316 changed files with 130657 additions and 626 deletions

View File

@@ -0,0 +1,51 @@
using System.Collections.Generic;
using Unity.Mathematics;
namespace ET.Server
{
[ComponentOf(typeof(Unit))]
public class AOIEntity: Entity, IAwake<int, float3>, IDestroy
{
public Unit Unit => this.GetParent<Unit>();
public int ViewDistance;
private EntityRef<Cell> cell;
public Cell Cell
{
get
{
return this.cell;
}
set
{
this.cell = value;
}
}
// 观察进入视野的Cell
public HashSet<long> SubEnterCells = new HashSet<long>();
// 观察离开视野的Cell
public HashSet<long> SubLeaveCells = new HashSet<long>();
// 观察进入视野的Cell
public HashSet<long> enterHashSet = new HashSet<long>();
// 观察离开视野的Cell
public HashSet<long> leaveHashSet = new HashSet<long>();
// 我看的见的Unit
public Dictionary<long, AOIEntity> SeeUnits = new Dictionary<long, AOIEntity>();
// 看见我的Unit
public Dictionary<long, AOIEntity> BeSeeUnits = new Dictionary<long, AOIEntity>();
// 我看的见的Player
public Dictionary<long, AOIEntity> SeePlayers = new Dictionary<long, AOIEntity>();
// 看见我的Player单独放一个Dict用于广播
public Dictionary<long, AOIEntity> BeSeePlayers = new Dictionary<long, AOIEntity>();
}
}