public void Select(WorldObject obj, bool playSound = true)
 {
     if (obj == null)
     {
         Log.Error("Cannot select null.");
         return;
     }
     selectedTile = -1;
     if (selected.Count < 80 && !IsSelected(obj))
     {
         if (playSound)
         {
             PlaySelectionSoundFor(obj);
         }
         selected.Add(obj);
         WorldSelectionDrawer.Notify_Selected(obj);
     }
 }
示例#2
0
 public void Select(WorldObject obj, bool playSound = true)
 {
     if (obj == null)
     {
         Log.Error("Cannot select null.");
     }
     else
     {
         this.selectedTile = -1;
         if (this.selected.Count < 80 && !this.IsSelected(obj))
         {
             if (playSound)
             {
                 this.PlaySelectionSoundFor(obj);
             }
             this.selected.Add(obj);
             WorldSelectionDrawer.Notify_Selected(obj);
         }
     }
 }