Example #1
0
 protected virtual void Start()
 {
     controller = new ControllerMainMenu(this);
     for (int i = 0; i < transform.childCount; i++)
     {
         transform.GetChild(i).GetComponent <IMenuSelection>();
     }
     current = transform.GetChild(_selectedOption).GetComponent <IMenuSelection>();
     current.Highlight();
 }
Example #2
0
    void Highlighting()
    {
        if (transform.GetChild(_selectedOption).gameObject.activeSelf)
        {
            current = transform.GetChild(_selectedOption).GetComponent <IMenuSelection>();

            for (int i = 0; i < transform.childCount; i++)
            {
                transform.GetChild(i).GetComponent <IMenuSelection>().Unhighlight();
            }
            current.Highlight();
        }
    }