예제 #1
0
        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);
                    }
                }
            }
        }
예제 #2
0
    /// <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;
            }
        });
    }
예제 #3
0
    /// <summary>
    /// 生成刷新配置
    /// </summary>
    protected override void generateRefresh()
    {
        if (_explain == null)
        {
            _explain = explain;
        }
        explain = LanguageConfig.getText(_explain);

        iconT = LoadControl.getResourceIDByName(icon);
    }
예제 #4
0
    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();
    }
예제 #5
0
    /// <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);
    }
예제 #6
0
    /** 开始载入场景(第一阶段) */
    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();
    }
예제 #7
0
 /// <summary>
 /// 生成刷新配置
 /// </summary>
 protected override void generateRefresh()
 {
     sourceT = LoadControl.getResourceIDByName(source);
     soundT  = LoadControl.getResourceIDByName(sound);
 }
예제 #8
0
 /// <summary>
 /// 生成刷新配置
 /// </summary>
 protected override void generateRefresh()
 {
     sourceExListT = LoadControl.getResourceIDsByNames(sourceExList);
     sourceT       = LoadControl.getResourceIDByName(source);
     musicT        = LoadControl.getResourceIDByName(music);
 }
예제 #9
0
 /// <summary>
 /// 播放音效
 /// </summary>
 public void playSound(string name)
 {
     playSound(LoadControl.getResourceIDByName(name));
 }
예제 #10
0
 /// <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);
 }
예제 #11
0
 /// <summary>
 /// 生成刷新配置
 /// </summary>
 protected override void generateRefresh()
 {
     iconT = LoadControl.getResourceIDByName(icon);
 }
예제 #12
0
 public void load(string path)
 {
     load(LoadControl.getResourceIDByName(path));
 }