void AddWarning(UInt64 owner) { Ientity ownerEntity = EntityManager.AllEntitys[owner]; BuildingAtkWarning warning = new BuildingAtkWarning(); warning.CreateCircleRes(ownerEntity); objDic.Add(warning, ownerEntity); }
bool ContainWarning(Ientity entity) { for (int i = objDic.Count - 1; i >= 0; i--) { BuildingAtkWarning warning = objDic.ElementAt(i).Key; if (warning.GetTarget() == entity) { return(true); } } return(false); }
public void OnUpdate() { if (objDic == null || objDic.Count == 0) { return; } for (int i = objDic.Count - 1; i >= 0; i--) { BuildingAtkWarning warning = objDic.ElementAt(i).Key; warning.OnUpdate(); } }
public void RemoveWarning(BuildingAtkWarning warning) { warning.Clean(); objDic.Remove(warning); warning = null; }