Exemple #1
0
        private BaseWindow LoadWindow(WindowInfo info)
        {
            Object res = null;

            if (resMap.TryGetValue(info.path, out res) == false)
            {
                res = Resources.Load(info.path);
                resMap.Add(info.name, res);
            }
            GameObject windowObj = GameObject.Instantiate(res, Vector3.zero, Quaternion.identity, contentTrans) as GameObject;
            BaseWindow window    = (BaseWindow)GameUtils.GetOrAddComponent(windowObj, info.type);

            window.info = info;
            BaseWindowView view = (BaseWindowView)windowObj.GetComponent <BaseWindowView>();

            window.SetView(windowObj.GetComponent <BaseWindowView>());
            return(window);
        }
Exemple #2
0
 public void SetView(BaseView view)
 {
     this.view = view as BaseWindowView;
 }