Пример #1
0
    /// <summary>
    /// Funzione di inizializzione
    /// </summary>
    public void Init()
    {
        currentUICtrl.ClearCurrentMenu();

        UI_Controller[] uiCtrls = FindObjectsOfType <UI_Controller>();
        for (int i = 0; i < uiCtrls.Length; i++)
        {
            if (uiCtrls[i] != defaultUICtrl)
            {
                currentUICtrl = uiCtrls[i];
                break;
            }
        }

        if (currentUICtrl != null)
        {
            currentUICtrl.Setup(gm);
        }
        else
        {
            currentUICtrl = defaultUICtrl;
        }
    }