public void RemoveUnit(UnitType type, UnitEntity unit) { UnitEntity removeEntity = unitEntities[type][unit.EntityID]; unitEntities[type].Remove(removeEntity.EntityID); removeEntity.Destroy(); }
ChampionEntity GetChampionEntity(uint peerID) { UnitEntity champion = unitEntities[UnitType.Champion].Values.FirstOrDefault(x => ((ChampionEntity)x).PeerID == peerID); if (champion != null) { return((ChampionEntity)champion); } else { return(null); } }
public void RemoveUnit(UnitEntity unit) { units[unit.Team].Remove(unit.GetComponent <BodyComponent>().Body); }
public void AddUnit(UnitEntity unit) { units[unit.Team].Add(unit.GetComponent <BodyComponent>().Body, unit); }
public void AddUnit(UnitType type, UnitEntity unit) { unitEntities[type].Add(unit.EntityID, unit); }