Exemplo n.º 1
0
 public void AnalyseSkillMarkParticleSkin(ref ActorPreloadTab loadInfo, string _resName)
 {
     for (int i = 0; i < 3; i++)
     {
         AssetLoadBase assetLoadBase = default(AssetLoadBase);
         assetLoadBase.assetPath    = SkinResourceHelper.GetSkinResourceName(loadInfo.theActor.ConfigId, loadInfo.MarkID, _resName, i);
         assetLoadBase.nInstantiate = 1;
         loadInfo.parPrefabs.Add(assetLoadBase);
     }
 }
Exemplo n.º 2
0
 public void AnalyseSkillMarkParticleSkin(ref ActorPreloadTab loadInfo, string _resName)
 {
     for (int i = 0; i < 3; i++)
     {
         AssetLoadBase item = new AssetLoadBase {
             assetPath    = SkinResourceHelper.GetSkinResourceName(loadInfo.theActor.ConfigId, loadInfo.MarkID, _resName, i),
             nInstantiate = 1
         };
         loadInfo.parPrefabs.Add(item);
     }
 }
Exemplo n.º 3
0
    public List <ActorPreloadTab> AnalyseAgeRefAssets(Dictionary <long, Dictionary <object, AssetRefType> > refAssetsDict)
    {
        List <ActorPreloadTab> list = new List <ActorPreloadTab>();

        Dictionary <long, Dictionary <object, AssetRefType> > .Enumerator enumerator = refAssetsDict.GetEnumerator();
        while (enumerator.MoveNext())
        {
            KeyValuePair <long, Dictionary <object, AssetRefType> > current = enumerator.Current;
            long key      = current.Key;
            int  markID   = (int)(key >> 0x20);
            int  configID = (int)(((ulong)key) & 0xffffffffL);
            KeyValuePair <long, Dictionary <object, AssetRefType> > pair2 = enumerator.Current;
            Dictionary <object, AssetRefType> dictionary = pair2.Value;
            ActorPreloadTab item = new ActorPreloadTab {
                ageActions    = new List <AssetLoadBase>(),
                parPrefabs    = new List <AssetLoadBase>(),
                mesPrefabs    = new List <AssetLoadBase>(),
                spritePrefabs = new List <AssetLoadBase>(),
                soundBanks    = new List <AssetLoadBase>(),
                behaviorXml   = new List <AssetLoadBase>(),
                MarkID        = markID
            };
            item.theActor.ConfigId = configID;
            list.Add(item);
            Dictionary <object, AssetRefType> .Enumerator enumerator2 = dictionary.GetEnumerator();
            while (enumerator2.MoveNext())
            {
                AssetLoadBase base3;
                int           num4;
                AssetLoadBase base4;
                AssetLoadBase base5;
                int           num5;
                AssetLoadBase base6;
                KeyValuePair <object, AssetRefType> pair3 = enumerator2.Current;
                AssetRefType type = pair3.Value;
                KeyValuePair <object, AssetRefType> pair4 = enumerator2.Current;
                object obj2 = pair4.Key;
                switch (type)
                {
                case AssetRefType.Action:
                {
                    AssetLoadBase base2 = new AssetLoadBase {
                        assetPath = obj2 as string
                    };
                    string checkerKey = this.GetCheckerKey(base2.assetPath, markID);
                    if (!this.ageCheckerSet.ContainsKey(checkerKey))
                    {
                        item.ageActions.Add(base2);
                        this.ageCheckerSet.Add(checkerKey, true);
                    }
                    continue;
                }

                case AssetRefType.SkillID:
                {
                    KeyValuePair <object, AssetRefType> pair7 = enumerator2.Current;
                    int skillID = (int)pair7.Key;
                    this.AnalyseSkill(ref item, skillID);
                    continue;
                }

                case AssetRefType.SkillCombine:
                {
                    KeyValuePair <object, AssetRefType> pair6 = enumerator2.Current;
                    int combineId = (int)pair6.Key;
                    this.AnalyseSkillCombine(ref item, combineId);
                    continue;
                }

                case AssetRefType.Prefab:
                    base3 = new AssetLoadBase {
                        assetPath = obj2 as string
                    };
                    item.mesPrefabs.Add(base3);
                    if (markID == 0)
                    {
                        continue;
                    }
                    num4 = 0;
                    goto Label_01CC;

                case AssetRefType.Particle:
                {
                    base5 = new AssetLoadBase();
                    KeyValuePair <object, AssetRefType> pair5 = enumerator2.Current;
                    base5.assetPath = pair5.Key as string;
                    item.parPrefabs.Add(base5);
                    if (markID == 0)
                    {
                        continue;
                    }
                    num5 = 0;
                    goto Label_024D;
                }

                case AssetRefType.Sound:
                {
                    continue;
                }

                case AssetRefType.MonsterConfigId:
                {
                    KeyValuePair <object, AssetRefType> pair8 = enumerator2.Current;
                    int       num8      = (int)pair8.Key;
                    ActorMeta actorMeta = new ActorMeta {
                        ActorType = ActorTypeDef.Actor_Type_Monster,
                        ConfigId  = num8,
                        ActorCamp = COM_PLAYERCAMP.COM_PLAYERCAMP_MID
                    };
                    this.AddPreloadActor(ref list, ref actorMeta, 0f, 0);
                    continue;
                }

                default:
                {
                    continue;
                }
                }
Label_0198:
                base4           = new AssetLoadBase();
                base4.assetPath = SkinResourceHelper.GetSkinResourceName(configID, markID, base3.assetPath, num4);
                item.mesPrefabs.Add(base4);
                num4++;
Label_01CC:
                if (num4 < 3)
                {
                    goto Label_0198;
                }
                continue;
Label_0219:
                base6           = new AssetLoadBase();
                base6.assetPath = SkinResourceHelper.GetSkinResourceName(configID, markID, base5.assetPath, num5);
                item.parPrefabs.Add(base6);
                num5++;
Label_024D:
                if (num5 < 3)
                {
                    goto Label_0219;
                }
            }
        }
        return(list);
    }
Exemplo n.º 4
0
    public List <ActorPreloadTab> AnalyseAgeRefAssets(Dictionary <long, Dictionary <object, AssetRefType> > refAssetsDict)
    {
        List <ActorPreloadTab> list = new List <ActorPreloadTab>();

        Dictionary <long, Dictionary <object, AssetRefType> > .Enumerator enumerator = refAssetsDict.GetEnumerator();
        while (enumerator.MoveNext())
        {
            KeyValuePair <long, Dictionary <object, AssetRefType> > current = enumerator.get_Current();
            long key  = current.get_Key();
            int  num  = (int)(key >> 32);
            int  num2 = (int)(key & (long)((ulong)-1));
            KeyValuePair <long, Dictionary <object, AssetRefType> > current2 = enumerator.get_Current();
            Dictionary <object, AssetRefType> value = current2.get_Value();
            ActorPreloadTab actorPreloadTab         = new ActorPreloadTab();
            actorPreloadTab.ageActions        = new List <AssetLoadBase>();
            actorPreloadTab.parPrefabs        = new List <AssetLoadBase>();
            actorPreloadTab.mesPrefabs        = new List <AssetLoadBase>();
            actorPreloadTab.spritePrefabs     = new List <AssetLoadBase>();
            actorPreloadTab.soundBanks        = new List <AssetLoadBase>();
            actorPreloadTab.behaviorXml       = new List <AssetLoadBase>();
            actorPreloadTab.MarkID            = num;
            actorPreloadTab.theActor.ConfigId = num2;
            list.Add(actorPreloadTab);
            Dictionary <object, AssetRefType> .Enumerator enumerator2 = value.GetEnumerator();
            while (enumerator2.MoveNext())
            {
                KeyValuePair <object, AssetRefType> current3 = enumerator2.get_Current();
                AssetRefType value2 = current3.get_Value();
                KeyValuePair <object, AssetRefType> current4 = enumerator2.get_Current();
                object key2 = current4.get_Key();
                switch (value2)
                {
                case AssetRefType.Action:
                {
                    AssetLoadBase assetLoadBase = default(AssetLoadBase);
                    assetLoadBase.assetPath = (key2 as string);
                    string checkerKey = this.GetCheckerKey(assetLoadBase.assetPath, num);
                    if (!this.ageCheckerSet.ContainsKey(checkerKey))
                    {
                        actorPreloadTab.ageActions.Add(assetLoadBase);
                        this.ageCheckerSet.Add(checkerKey, true);
                    }
                    break;
                }

                case AssetRefType.SkillID:
                {
                    KeyValuePair <object, AssetRefType> current5 = enumerator2.get_Current();
                    ulong num3    = (ulong)current5.get_Key();
                    int   skillID = (int)(num3 & (ulong)-1);
                    this.AnalyseSkill(ref actorPreloadTab, skillID);
                    break;
                }

                case AssetRefType.SkillCombine:
                {
                    KeyValuePair <object, AssetRefType> current6 = enumerator2.get_Current();
                    ulong num4      = (ulong)current6.get_Key();
                    int   combineId = (int)(num4 & (ulong)-1);
                    this.AnalyseSkillCombine(ref actorPreloadTab, combineId);
                    break;
                }

                case AssetRefType.Prefab:
                {
                    AssetLoadBase assetLoadBase2 = default(AssetLoadBase);
                    assetLoadBase2.assetPath = (key2 as string);
                    actorPreloadTab.mesPrefabs.Add(assetLoadBase2);
                    if (num != 0)
                    {
                        for (int i = 0; i < 3; i++)
                        {
                            AssetLoadBase assetLoadBase3 = default(AssetLoadBase);
                            assetLoadBase3.assetPath = SkinResourceHelper.GetSkinResourceName(num2, num, assetLoadBase2.assetPath, i);
                            actorPreloadTab.mesPrefabs.Add(assetLoadBase3);
                        }
                    }
                    break;
                }

                case AssetRefType.Particle:
                {
                    AssetLoadBase assetLoadBase4 = default(AssetLoadBase);
                    KeyValuePair <object, AssetRefType> current7 = enumerator2.get_Current();
                    assetLoadBase4.assetPath = (current7.get_Key() as string);
                    actorPreloadTab.parPrefabs.Add(assetLoadBase4);
                    if (num != 0)
                    {
                        for (int j = 0; j < 3; j++)
                        {
                            AssetLoadBase assetLoadBase5 = default(AssetLoadBase);
                            assetLoadBase5.assetPath = SkinResourceHelper.GetSkinResourceName(num2, num, assetLoadBase4.assetPath, j);
                            actorPreloadTab.parPrefabs.Add(assetLoadBase5);
                        }
                    }
                    break;
                }

                case AssetRefType.MonsterConfigId:
                {
                    KeyValuePair <object, AssetRefType> current8 = enumerator2.get_Current();
                    ulong     num5      = (ulong)current8.get_Key();
                    int       configId  = (int)(num5 & (ulong)-1);
                    ActorMeta actorMeta = default(ActorMeta);
                    actorMeta.ActorType = ActorTypeDef.Actor_Type_Monster;
                    actorMeta.ConfigId  = configId;
                    actorMeta.ActorCamp = COM_PLAYERCAMP.COM_PLAYERCAMP_MID;
                    this.AddPreloadActor(ref list, ref actorMeta, 0f, 0);
                    break;
                }

                case AssetRefType.CallActorConfigId:
                {
                    KeyValuePair <object, AssetRefType> current9 = enumerator2.get_Current();
                    ulong     num6       = (ulong)current9.get_Key();
                    int       configId2  = (int)(num6 & (ulong)-1);
                    ActorMeta actorMeta2 = default(ActorMeta);
                    actorMeta2.ActorType = ActorTypeDef.Actor_Type_Hero;
                    actorMeta2.ConfigId  = configId2;
                    actorMeta2.ActorCamp = COM_PLAYERCAMP.COM_PLAYERCAMP_MID;
                    this.AddPreloadActor(ref list, ref actorMeta2, 0f, 0);
                    break;
                }
                }
            }
        }
        return(list);
    }