Esempio n. 1
0
    void OpenWindow(WindowIndex index, bool openAsTop = true, Action <WindowBase> onOpened = null
                    )
    {
        var wnd = windowList[(int)index];

        if (wnd == null)
        {
            Debug.LogError("Wnd is not exist index " + index.ToString());
            return;
        }

        wnd.Open(openAsTop);

        if (onOpened != null)
        {
            onOpened(wnd);
        }
    }
Esempio n. 2
0
    void CreateWindow(WindowIndex index, Action <WindowBase> onCreated)
    {
        ResourceManager.Get().LoadResource(windowPathDict[index], (o) =>
        {
            var wind = o.GetComponent <WindowBase>();

            if (wind == null)
            {
                Debug.Log("ロードしたオブジェクトにwindowが無かった");
            }
            else
            {
                windowList[(int)index] = wind;
            }
        }, (path) =>
        {
            Debug.LogError(index.ToString() + "のロードが失敗した");
        });
    }