Ejemplo n.º 1
0
        private void Init(GameViewConfig gameViewConfig, Transform parent)
        {
            Config = gameViewConfig;

            UIparent = parent;

            ConfigViewDictionary = new Dictionary <string, GameViewInfo>();

            ViewDictionary = new List <GameViewAbstract>();

            if (Config == null)
            {
                return;
            }

            ConfigViewDictionary = Config.GetViewWithDic();

            foreach (string item in ConfigViewDictionary.Keys)
            {
                if (ConfigViewDictionary[item].isCache)
                {
                    GameViewAbstract game = CreateView(item);
                    game.gameObject.SetActive(false);
                    ViewDictionary.Add(game);
                }
            }
            if (Config.DefaultViewTable != null && Config.DefaultViewTable != "")
            {
                OpenView(Config.DefaultViewTable);
            }
        }
Ejemplo n.º 2
0
 public void SetConfig(GameViewConfig config)
 {
     Config = config;
 }
Ejemplo n.º 3
0
 public GameViewManager(GameViewConfig gameViewConfig, Transform parent)
 {
     Init(gameViewConfig, parent);
 }
Ejemplo n.º 4
0
 public static GameViewManager InstantiateViewManager(GameViewConfig gameViewConfig, Transform parent)
 {
     return(new GameViewManager(gameViewConfig, parent));
 }