コード例 #1
0
 /// <summary>
 /// Will deselect current selected object
 /// </summary>
 /// <param name="touchedObj"></param>
 public void RemoveSelection(ISelectiable deselectMe)
 {
     //TODO : Check if right state
     deselectMe.ToggleSelection(false);
     current = null;
     if (onObjectDeselectedEvent != null)
     {
         onObjectDeselectedEvent.Invoke();
     }
     //Change state?
 }
コード例 #2
0
 /// <summary>
 /// Setting new selected object and update selection state of priv and current objects
 /// </summary>
 /// <param name="newSelected"></param>
 public void RegisterSelection(ISelectiable newSelected)
 {
     //TODO : Check if right state
     if (current != null)
     {
         current.ToggleSelection(false);
     }
     newSelected.ToggleSelection(true);
     current = newSelected;
     if (onObjectSelectedEvent != null)
     {
         onObjectSelectedEvent.Invoke();
     }
     //Update state?
 }