using System.Collections.Generic; public partial class CombatContext { public int localPlayerEid = -1; public int leveWaveEid = -1; public int localCtrlEid = -1; public static readonly List s_CacheEntities = new(); private CombatEntity m_GlobalEnt; public CombatEntity GlobalEnt => m_GlobalEnt; public void SetGlobalEnt(CombatEntity ent) { m_GlobalEnt = ent; } public CombatEntity LocalPlayer => GetEntity(localPlayerEid); public CombatEntity LevelWave => GetEntity(leveWaveEid); public new CombatEntity GetEntity(int entityId) { return _entities.GetValueOrDefault(entityId); } }