Esempio n. 1
0
        public UiModule(Contexts contexts)
        {
            UiModule.contexts = contexts;

            instance = this;
            var loader = new UiResourceLoader(contexts.session.commonSession.AssetManager);

            AbstractModel.SetUiResourceLoader(loader);
            FreeGlobalVars.Loader = loader;
            if (UIImageLoader.LoadSpriteAsync == null) //没有通过大厅直接进入游戏
            {
                UIImageLoader.LoadSpriteAsync = loader.RetriveSpriteAsync;
            }

            if (UIImageLoader.LoadTextureAsync == null)
            {
                UIImageLoader.LoadTextureAsync = loader.RetriveTextureAsync;
            }

            InitBlurManager(loader);            InitUiSubManager(loader);            AddModelSystems();
            AddSystem(new UiSessionSystem(contexts));
            //AddSystem(new UiPlayerDataInitSystem(contexts));
            AddSystem(new ObserveUISystem(contexts));
            AddSystem(this);
        }
Esempio n. 2
0
        public UiLoadModule(ISessionState sessionState, Contexts contexts)
        {
//            var uiRoot = GameObject.Find("ClientUIRoot");
//            UiCommon.UIManager = new UIManager("ClientUIRoot");
//            UiCommon.TipManager = UiCommon.UIManager.GetTipManager();

            var loader = new UiResourceLoader(contexts.session.commonSession.AssetManager);

            AbstractModel.SetUiResourceLoader(loader);
            AddSystem(new UiLoadSystem(sessionState, contexts));
        }
Esempio n. 3
0
        private void InitBlurManager(UiResourceLoader loader)
        {
            var root = UiCommon.UIManager.UIRoot;

            loader.LoadAsync("ui/hall/prefabs/common", "SceneBlurImage", (obj)
                             =>
            {
                var blur      = root.AddComponent <BlurManager>();
                blur.rootName = root.name;
                blur.SetBlurImage(obj as GameObject);
            });
        }
Esempio n. 4
0
        public UiModule(Contexts contexts)
        {
            UiModule.contexts = contexts;

            instance = this;
            var loader = new UiResourceLoader(contexts.session.commonSession.AssetManager);

            AbstractModel.SetUiResourceLoader(loader);
            FreeGlobalVars.Loader = loader;

            AddModelSystems();
            AddSystem(new UiSessionSystem(contexts));
            AddSystem(new UiPlayerDataInitSystem(contexts));
            AddSystem(this);
        }