Пример #1
0
 public void UnitSelectedEventHandler(object sender, SelectedEventArgs args)
 {
     if (args.Objects == null || args.Objects.Count <= 0)
     {
         _selected = null;
         return;
     }
     if (args.Objects.Count == 1 && args.Objects[0] is Unit)
     {
         _selected = (Unit)args.Objects[0];
     }
     else
         _selected = null;
 }
Пример #2
0
 /// <summary>
 /// Handler for GameObjectSelected event.
 /// </summary>
 /// <param name="sencer">Object that triggered the event.</param>
 /// <param name="args">Event arguments for the GameObjectSeleted event.</param>
 private void GameObjectsSeleted(object sencer, SelectedEventArgs args)
 {
     _selectedObjects = args.Objects;
 }