private void doBundleSaveOne(string bundleName, int type) { ResourceSaveExData data = _newVersion.getBundleEx(bundleName); if (data != null) { if (ShineToolSetting.bundlePackNeedPutDependAlsoIntoStreamingAssets && type == ResourceSaveType.InStreamingAsset && data.saveType != type) { data.saveType = type; } } else { data = doFileSaveData(getTargetSourcePath(), bundleName, type); if (ShineToolSetting.bundlePackNeedPutDependAlsoIntoStreamingAssets) { int resourceID = LoadControl.getResourceIDByName(data.name); BundleInfoData bundleInfoData = LoadControl.getBundleInfo(resourceID); foreach (int d in bundleInfoData.depends) { string pName = LoadControl.getResourceNameByID(d); //父类型 doBundleSaveOne(pName, type); } } } }
/// <summary> /// 读完所有表后处理 /// </summary> public static void afterReadConfigAll() { firstLoadList = new IntList(); firstSceneLoadList = new IntList(); _dic.forEachValue(v => { int resourceID = LoadControl.getResourceIDByName(BaseGameUtils.getURLReplace(v.url)); switch (v.type) { case MarkResourceType.FirstLoad: { firstLoadList.add(resourceID); } break; case MarkResourceType.FirstSceneLoad: { firstSceneLoadList.add(resourceID); } break; } }); }
/// <summary> /// 生成刷新配置 /// </summary> protected override void generateRefresh() { if (_explain == null) { _explain = explain; } explain = LanguageConfig.getText(_explain); iconT = LoadControl.getResourceIDByName(icon); }
public override void init() { base.init(); _wallRoot = GameObject.Find("wall"); _wall1Rid = LoadControl.getResourceIDByName(GGlobal.source_wall1); _wall2Rid = LoadControl.getResourceIDByName(GGlobal.source_wall2); //场景显示构造 _gridConfig = _scene.getMapInfoConfig().grid; makeWall(); }
/// <summary> /// 生成刷新配置 /// </summary> protected override void generateRefresh() { if (_name == null) { _name = name; } name = LanguageConfig.getText(_name); if (_explain == null) { _explain = explain; } explain = LanguageConfig.getText(_explain); enableTimeT = new TimeExpression(enableTime); iconT = LoadControl.getResourceIDByName(icon); }
/** 开始载入场景(第一阶段) */ public void startLoad(Action overFunc) { _overFunc = overFunc; _partOneComplete = false; _firstSet = new IntSet(); _firstSet.addAll(MarkResourceConfig.firstSceneLoadList); SceneMapConfig config = _scene.getMapConfig(); _firstSet.add(config.sourceT); _firstSet.add(config.musicT); if (CommonSetting.clientNeedScenePlaceEditor) { string scenePlaceEditorConfigPath = BaseC.config.getSplitConfigPath(CommonSetting.scenePlaceEditor, _scene.getConfig().id); _firstSet.add(LoadControl.getResourceIDByName(scenePlaceEditorConfigPath)); } if (CommonSetting.clientMapNeedGrid) { string splitConfigPath = BaseC.config.getSplitConfigPath(CommonSetting.mapInfo, config.id); _firstSet.add(LoadControl.getResourceIDByName(splitConfigPath)); } foreach (int v in config.sourceExListT) { _firstSet.add(v); } makeListEx(); doLoadOne(); }
/// <summary> /// 生成刷新配置 /// </summary> protected override void generateRefresh() { sourceT = LoadControl.getResourceIDByName(source); soundT = LoadControl.getResourceIDByName(sound); }
/// <summary> /// 生成刷新配置 /// </summary> protected override void generateRefresh() { sourceExListT = LoadControl.getResourceIDsByNames(sourceExList); sourceT = LoadControl.getResourceIDByName(source); musicT = LoadControl.getResourceIDByName(music); }
/// <summary> /// 播放音效 /// </summary> public void playSound(string name) { playSound(LoadControl.getResourceIDByName(name)); }
/// <summary> /// 播放背景音乐(同时只能播放一个) /// </summary> /// <param name="name">音乐资源</param> /// <param name="force">是否强制重新播放</param> /// <param name="loop">是否重复</param> public void playMusic(string name, bool force, bool loop = true) { playMusic(LoadControl.getResourceIDByName(name), force, loop); }
/// <summary> /// 生成刷新配置 /// </summary> protected override void generateRefresh() { iconT = LoadControl.getResourceIDByName(icon); }
public void load(string path) { load(LoadControl.getResourceIDByName(path)); }