Exemplo n.º 1
0
    void Awake()
    {
        rectTransform = GetComponent <RectTransform>();

        canvasGroup = targetMenu.GetComponent <CanvasGroup>();
        menu        = targetMenu.GetComponent <UI_Menu>();
    }
Exemplo n.º 2
0
 private void Awake()
 {
     buttonImage       = this.GetComponent <Image>();
     menuScript        = MenuTransform.GetComponent <UI_Menu>();
     isOff             = false;
     isAnimating       = false;
     buttonImage.color = Color.white;
 }
Exemplo n.º 3
0
    public void Hide()
    {
        UI_Menu menu = GameObject.FindObjectOfType <UI_Menu>();

        if (menu != null)
        {
            menu.ShowSquadSelection(false);
        }
    }
Exemplo n.º 4
0
    public virtual void Init(UI_PlayerBase creator, string title, UI_Menu instigator = null)
    {
        options         = new List <MenuButton>();
        UI_base         = creator;
        panelName       = title;
        this.instigator = instigator;

        childClosedHandler = ChildMenuClosed;
    }
Exemplo n.º 5
0
    public override void Init(UI_PlayerBase creator, string title, UI_Menu instigator = null)
    {
        base.Init(creator, title, instigator);

        float w = 700.0f;
        float h = 400.0f;

        buttonWidth = 150.0f;

        panel = new Rect(Screen.width / 2.0f - w / 2.0f, Screen.height / 2.0f - h / 2.0f, w, h);
    }
Exemplo n.º 6
0
    public override void Init(UI_PlayerBase creator, string title, UI_Menu instigator = null)
    {
        base.Init(creator, title, instigator);

        float w = 700.0f;
        float h = 400.0f;

        buttonWidth = 350.0f;

        panel = new Rect(Screen.width / 2.0f - w / 2.0f, Screen.height / 2.0f - h / 2.0f, w, h);
    }
Exemplo n.º 7
0
    public virtual void Init(UI_PlayerBase creator, string title, UI_Menu instigator = null)
    {
        options = new List<MenuButton>();
        UI_base = creator;
        panelName = title;
        this.instigator = instigator;

        childClosedHandler = ChildMenuClosed;
    }