Example #1
0
 public void AddUnit(DetectedUnit detectedUnit)
 {
     if (!DetectedUnits.Exists(u => u.Id == detectedUnit.Id))
     {
         DetectedUnits.Add(detectedUnit);
         detectedUnit.DetectedGroupId = this.Id;
         SetDirty(GameConstants.DirtyStatus.UnitChanged);
     }
 }
Example #2
0
        public bool RemoveUnit(DetectedUnit detectedUnit)
        {
            bool result = DetectedUnits.Remove(detectedUnit);

            if (result)
            {
                detectedUnit.DetectedGroupId = string.Empty;
                SetDirty(GameConstants.DirtyStatus.UnitChanged);
            }
            return(result);
        }