Esempio n. 1
0
        public void InitPathData()
        {
            if (War.isEditor)
            {
                return;
            }

            if (War.model.stagePaths.ContainsKey(id))
            {
                pathData = War.model.stagePaths[id];
            }
            else
            {
                object asset = WarRes.GetRes <object>(StagePathData.GetFilePath(id));
//				Debug.Log(asset);
                pathData = JsonConvert.DeserializeObject(asset.ToString(), typeof(StagePathData)) as StagePathData;
                pathData.PointToVector3();

                War.model.stagePaths[id] = pathData;
            }
        }
Esempio n. 2
0
        /** 生成预加载资源 */
        public static void GenerationPreloadList()
        {
            preloadList.Clear();
            List <string> list = preloadList;

//			for(int colorId = 0; colorId < 3; colorId ++)
//			{
//	            for (int leveId = 0; leveId < 3; leveId++)
//	            {
//					list.Add("unit_prefab/turret/t_01_jianta_"+ colorId + "_" + leveId);
//				}
//				list.Add("unit_prefab/spot/spot_01_zhangpeng_"+ colorId );
//            }


            int stageId = War.sceneData.id;

            if (!War.model.stagePaths.ContainsKey(stageId))
            {
                list.Add(StagePathData.GetFilePath(stageId));
            }


            list.Add(WarRes.e_legionexp_l);
            list.Add(WarRes.e_legionexp_m);
            list.Add(WarRes.e_legionexp_s);

            list.Add(WarRes.e_spot_change);
            list.Add(WarRes.e_target_build_own);

            list.Add(WarRes.e_buffstate_atk_up);
            list.Add(WarRes.e_buffstate_movespeed_up);
            list.Add(WarRes.e_buffstate_producespeed_up);

            list.Add(WarRes.Turret_Fx_Projectile);
            list.Add(WarRes.Turret_Fx_Explosion);

            list.Add(WarRes.SendArmy);

            list.Add(WarRes.Unit_Hun);
            list.Add(WarRes.Unit_AtkRadius);
            list.Add(WarRes.Unit_Shadow);
            list.Add(WarRes.Unit_Prefab_UnitPathGroup);
            list.Add(WarRes.Unit_Prefab_Solider);
            list.Add(WarRes.Unit_Build_Casern);
            list.Add(WarRes.Unit_Build_Turret);
            list.Add(WarRes.Unit_Build_Spot);
            list.Add(WarRes.Unit_Player);
            list.Add(WarRes.Unit_Hero);
            list.Add(WarRes.Unit_Wall);
            list.Add(WarRes.WarViews_UnitHP);
            list.Add(WarRes.WarViews_UnitClock);
            list.Add(WarRes.WarViews_UnitSOS);
            list.Add(WarRes.WarViews_HeroHead);
            list.Add(WarRes.WarViews_SkillHeadButton);
            list.Add(WarRes.War_View_SkillOperate_SelectUnit);
            list.Add(WarRes.effect_solider_walk);
            list.Add(WarRes.effect_soldiers_die);
//            list.Add(WarRes.effect_soldier_one_die);
            list.Add(WarRes.Effect_Beattack);
            list.Add(WarRes.build_legion_chenge);

            if (list.IndexOf(WarRes.Effect_Uplevel) == -1)
            {
                list.Add(WarRes.Effect_Uplevel);
            }



            list.Add(War.sceneData.mapConfig.terrain);
            list.Add(War.sceneData.mapConfig.buildGround);



            foreach (KeyValuePair <int, UnitData> buildKVP in War.sceneData.buildDict)
            {
                BuildConfig buildConfig = buildKVP.Value.buildConfig;
                buildConfig.GetResList(list, War.sceneData.colorIds);
            }



            foreach (KeyValuePair <int, UnitData> wallKVP in War.sceneData.wallDict)
            {
                string file = wallKVP.Value.prefabFile;
                if (list.IndexOf(file) == -1)
                {
                    list.Add(file);
                }
            }

            foreach (KeyValuePair <int, LegionData> legionKVP in War.sceneData.legionDict)
            {
                string file = legionKVP.Value.soliderData.prefabFile;
                if (list.IndexOf(file) == -1)
                {
                    list.Add(file);
                }

                foreach (KeyValuePair <int, SkillOperateData> skillKVP in legionKVP.Value.skillDatas)
                {
                    skillKVP.Value.skillConfig.GetRes(list);
                }
            }
        }