예제 #1
0
 public virtual void RemoveElement(BaseMenuElement element)
 {
     MenuElements.Remove(element);
     //DeselectAll();
     //  SelectFirstActiveIndex();
     ArrangeMenuElements();
 }
예제 #2
0
    // Update is called once per frame
    void Update()
    {
        if (actual.before != null)
        {
            actual.before.ElementActive = false;
        }
        if (actual.next != null)
        {
            actual.next.ElementActive = false;
        }

        actual.ElementActive = true;

        float direction = InputManager.PovVertical();

        if (direction > 0)
        {
            if (actual.before != null)
            {
                GameObject.FindGameObjectWithTag("SoundUtility").GetComponent <SoundListUtility>().PlayElementByName("selection_menu_option");


                actual = actual.before;
            }
        }
        if (direction < 0)
        {
            if (actual.next != null)
            {
                GameObject.FindGameObjectWithTag("SoundUtility").GetComponent <SoundListUtility>().PlayElementByName("selection_menu_option");

                actual = actual.next;
            }
        }
    }
예제 #3
0
 /// <summary>
 /// Adds an element to the elment list.
 /// </summary>
 public virtual void AddElement(BaseMenuElement element)
 {
     MenuElements.Add(element);
     ArrangeMenuElements();
 }