/// <summary>
        /// 加载骨骼数据
        /// </summary>
        /// <param name="dataAssetName"></param>
        async CTask LoadSkeletonData(string dataAssetName)
        {
            _isLoaded     = false;
            _dataAsstName = dataAssetName;
            dataAsset     = await LoadHelper.LoadSkeletonData(dataAssetName);

            if (skeletonGraphic == null)
            {
                CLog.Error("获取物体骨骼动画组件错误");
                return;
            }

            skeletonGraphic.skeletonDataAsset = dataAsset;
            skeletonGraphic.Initialize(true);
            animations  = skeletonGraphic.skeletonDataAsset.GetSkeletonData(true).Animations.Items;
            aniNameList = new List <string>();
            for (int i = 0; i < animations.Length; i++)
            {
                aniNameList.Add(animations[i].Name);
            }

            PlayStaticAnimation();
            skeletonGraphic.AnimationState.TimeScale = 1;
            if (modelSetting != null)
            {
                skeletonGraphic.gameObject.transform.localScale = Vector3.one * modelSetting.Pos[1][2];
            }
            _isLoaded = true;
        }
Exemple #2
0
        /// <summary>
        /// 加载贴图
        /// </summary>
        /// <param name="img"></param>
        /// <param name="imgName"></param>
        /// <param name="imgName">IsAutoShow</param>
        public static async CTask SetTextures(this RawImage img, string imgName)
        {
            if (img == null)
            {
                return;
            }
            Texture tex = await LoadHelper.LoadTexture(imgName);

            if (img == null)
            {
                return;
            }
            img.texture = tex;
        }
Exemple #3
0
        private static async CTask Initialize()
        {
            await Mgr.Initialize();

            await LoadHelper.Initialize();

            //账密登陆,进入选服
            if (CSF.AppSetting.PlatformType != EPlatformType.PC)
            {
                //SDK初始化
                //SDKManager.I.SDK_Init();
            }



            // 打开登录界面选服
            await Mgr.UI.Show <LoginUI>().Await();

            //ServerListMgr.I.ReqServerList().Run(); //请求服务器列表
            //new Effect.ClickEffectTrigger();

            //关闭版本检测界面
            CSF.Mgr.VersionCheck.Close().Run();
        }