예제 #1
0
        public void RemoveUnit(UnitType type, UnitEntity unit)
        {
            UnitEntity removeEntity = unitEntities[type][unit.EntityID];

            unitEntities[type].Remove(removeEntity.EntityID);
            removeEntity.Destroy();
        }
예제 #2
0
        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);
            }
        }
예제 #3
0
 public void RemoveUnit(UnitEntity unit)
 {
     units[unit.Team].Remove(unit.GetComponent <BodyComponent>().Body);
 }
예제 #4
0
 public void AddUnit(UnitEntity unit)
 {
     units[unit.Team].Add(unit.GetComponent <BodyComponent>().Body, unit);
 }
예제 #5
0
 public void AddUnit(UnitType type, UnitEntity unit)
 {
     unitEntities[type].Add(unit.EntityID, unit);
 }