Ejemplo n.º 1
0
 private int GetCachedControlIndex(IActiveStateProperty target_group)
 {
     return(Enumerable.Range(0, NumberOfCachedControls)
            .Select(i => GetCachedControlByIndex(i))
            .TakeWhile(c => !target_group.Equals(c))
            .Count());
 }
Ejemplo n.º 2
0
 private void SetVisibleGroup(IActiveStateProperty[] target_groups, IActiveStateProperty selected)
 {
     foreach (IActiveStateProperty control in target_groups)
     {
         control.Active = false;
     }
     selected.Active = true;
 }
Ejemplo n.º 3
0
 private void SetSelected(IActiveStateProperty value)
 {
     if (!CachedControls.Contains(value))
     {
         throw new ArgumentException("Cannot select non-child target group");
     }
     if (!(value is MonoBehaviour))
     {
         throw new ArgumentException("Selected target group must inherit MonoBehaviour");
     }
     _SelectedBehavior = (MonoBehaviour)value;
     SetVisibleGroup(CachedControls, value);
 }
Ejemplo n.º 4
0
 public GroupTargetKey(ITargetGroup group, IActiveStateProperty active_state_property)
 {
     Group = group;
     ActiveStateProperty = active_state_property;
 }