Exemple #1
0
 public void Toggle()
 {
     if (isInGroup)
     {
         if (parent == null)
         {
             parent = transform.parent.GetComponent <CUIToggleGroup>();
         }
         if (parent == null)
         {
             parent = transform.parent.parent.GetComponent <CUIToggleGroup>();
         }
         parent.OnChildToggled(this, true, false, true);
     }
     else
     {
         if (isSelected)
         {
             Deselect();
         }
         else
         {
             Select();
         }
     }
 }
Exemple #2
0
        private void Awake()
        {
            button = GetComponent <Button>();

            if (isInGroup)
            {
                parent = transform.GetComponentInParent <CUIToggleGroup>();
            }
        }
Exemple #3
0
        private void Reset()
        {
            CUIToggleGroup group = transform.parent.GetComponent <CUIToggleGroup>();

            if (group != null)
            {
                group.FindChildrenToggles();
            }
        }
Exemple #4
0
 public void SetParentToggleGroup(CUIToggleGroup group)
 {
     parent = group;
 }