Ejemplo n.º 1
0
        /// <summary>
        /// 加载非关键性资源
        /// </summary>
        static IEnumerator LoadRemainResource()
        {
            if (!s_IsInitRemainRes)
            {
                s_IsInitingRemainRes = true;
                s_IsInitRemainRes    = true;

                IEnumerator itor = SkinnLoader.LoaddefaultSkins();
                while (itor.MoveNext())
                {
                    yield return(null);
                }

                itor = BoneLoader.LoadPlayerBone();
                while (itor.MoveNext())
                {
                    yield return(null);
                }


                s_IsInitingRemainRes = false;
            }
            else
            {
                while (s_IsInitingRemainRes)
                {
                    yield return(null);
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 初始化loader路径
        /// </summary>
        public static void InitGameLoader()
        {
            AnimationLoader.InitAniLoader(
                CommonValue.AniDir,
                CommonValue.AniWWWDir,
                CommonValue.InAniDir,
                CommonValue.InAniWWWDir,
                CommonValue.NetAniDir);

            BoneLoader.InitPlayerBone(
                CommonValue.BoneDir,
                CommonValue.BoneWWWDir,
                CommonValue.InBoneDir,
                CommonValue.InBoneWWWDir,
                CommonValue.NetBoneDir);

            ModelLoader.InitModelLoader(
                CommonValue.MaterialDir,
                CommonValue.MaterialWWWDir,
                CommonValue.InMaterialDir,
                CommonValue.InMaterialWWWDir,
                CommonValue.NetMaterialDir);

            SkinnLoader.InitSkinLoader(
                CommonValue.MaterialDir,
                CommonValue.MaterialWWWDir,
                CommonValue.InMaterialDir,
                CommonValue.InMaterialWWWDir,
                CommonValue.NetMaterialDir);

            UIWndLoader.InitUIWndLoader(
                CommonValue.UIDir,
                CommonValue.UIWWWDir,
                CommonValue.InUIDir,
                CommonValue.InUIWWWDir,
                CommonValue.NetUIDir);

            UIAtlasLoader.InitUIAtlasLoader(
                CommonValue.UIAtlasDir,
                CommonValue.UIAtlasWWWDir,
                CommonValue.InUIAtlasDir,
                CommonValue.InUIAtlasWWWDir,
                CommonValue.NetUIAtlasDir);

            ExtraLoader.InitExtraLoader(
                CommonValue.UITextureDir,
                CommonValue.UITextureWWWDir,
                CommonValue.InUITextureDir,
                CommonValue.InUITextureWWWDir,
                CommonValue.NetUITextureDir);

            SceneLoader.InitSceneLoader(
                CommonValue.StageWWWDir,
                CommonValue.StageDir,
                CommonValue.InStageWWWDir,
                CommonValue.InStageDir,
                CommonValue.NetStageDir
                );
        }