Exemplo n.º 1
0
 private void AfterConstructorCall(FSceneConfig cfg)
 {
     BuildChildMap();
     BuildControllerMap();
     displayObject.name             = cfg.name + "hahaha";
     displayObject.gameObject.name += "(" + cfg.name + ")";
 }
Exemplo n.º 2
0
        public static T CreateFScene <T>(FSceneConfig cfg) where T : FScene
        {
            if (!IsInit)
            {
                FSceneInit();
            }

            UIPackage.AddPackage(cfg.pkgPath);
            GObject obj = UIPackage.CreateObject(cfg.pkgName, cfg.componentName, typeof(T));

            if (obj == null)
            {
                throw new Exception("找不到指定组件 path:" + cfg.pkgPath + "组件名称:" + cfg.componentName);
            }
            var scene = obj as T;

            scene.AfterConstructorCall(cfg);
            return(scene);
        }