// Use this for initialization
    void Start()
    {
        manager     = UIManager.GetInstance();
        gameManager = GameManager.GetInstance();
        player      = GameObject.FindGameObjectWithTag("Player");

        options.Init(true, true);
    }
Esempio n. 2
0
        protected override void OnInit()
        {
            m_lastInputMethod     = Screen.InputMethod;
            m_lastPadType         = (Screen.Gamepad != null) ? Screen.Gamepad.Type : GamepadType.Unknown;
            m_lastSteamController = Screen.SteamController;

            m_text.Anchor        = Anchor;
            m_text.LocalPosition = LocalPosition;
            m_text.Parent        = this.Parent;
            m_text.Init(Screen);
        }
Esempio n. 3
0
    public void Init()
    {
        List <string> items = new List <string>();

        foreach (MenuJson.OptionMenuTab option in GameManager.GetInstance().menuJson.optionsMenu)
        {
            items.Add(option.tabName);
        }
        top.items = items.ToArray();
        topBar.Init();
        top.Init(false, true);

        top.ChangeButtons(ButtonManager.ButtonID.L1, ButtonManager.ButtonID.R1);

        bottomLeft.menuArea.SetParent(bottomMenu.menuArea);
        bottomRight.menuArea.SetParent(bottomMenu.menuArea);
        BottomMenuChange(0, true);
    }
Esempio n. 4
0
    public void Init()
    {
        hasSomeSave     = gameManager.saveJson.saves.Length != 0;
        hasSelectedSave = gameManager.saveIndex != -1 && hasSomeSave;

        List <string> items = new List <string>();

        foreach (MenuJson.MainMenuItem menuItem in gameManager.menuJson.mainMenu)
        {
            switch (menuItem.id)
            {
            case StarMenu.MenuItemId.Continue:
                if (!hasSelectedSave)
                {
                    continue;
                }
                break;

            case StarMenu.MenuItemId.Load_Game:
                if (!hasSomeSave)
                {
                    continue;
                }
                break;
            }
            items.Add(menuItem.name);
        }

        textMenu.items = items.ToArray();

        logo.Init();
        textMenu.Init(true, true);
        options.Init();
        loadZone.Init();
        load.menuArea.SetParent(loadZone.menuArea);
        load.Init();
    }