Exemplo 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);
        }
Exemplo n.º 2
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);
        }