示例#1
0
        private void HandleMountEffect(ref MountEffect mountEffect, string[] data)
        {
            string newCombined = "";

            foreach (string full in data)
            {
                newCombined += full + " ";
            }

            string[] reSplit = newCombined.Split(' ').CleanStringArray();

            for (int index = 0; index < reSplit.Count(); index += 2)
            {
                mountEffect.mountType.Add(reSplit[index]);
                mountEffect.modifier.Add(Convert.ToInt32(reSplit[index + 1]));
            }
        }
示例#2
0
    protected void OnEffectChangeEvent(int _index)
    {
        if (fxCtrl == null)
        {
            fxCtrl = this.gameObject.AddComponent <FXCtrl>();
        }
        fxCtrl.CleanBonesEffect();
        if (isDummy)
        {
            return;
        }

        if (fxCtrl != null)
        {
            if (actorInfo != null && actorInfo.MountEffectList.Count > 0)
            {
                //                foreach (var effect in actorInfo.BoneEffectList)
                //                {
                //					if(!string.IsNullOrEmpty(effect.boneName) && !string.IsNullOrEmpty(effect.effectName))
                //                      fxCtrl.SetBoneEffect(effect.boneName, effect.effectName, actorInfo.ModelScale);
                //                }
                for (int i = 0, max = actorInfo.MountEffectList.Count; i < max; i++)
                {
                    MountEffect effect = actorInfo.MountEffectList[i];
                    if (actorInfo.MountKind == MountType.SKINLIST)
                    {
                        if (!string.IsNullOrEmpty(effect.boneName) && !string.IsNullOrEmpty(effect.effectName))
                        {
                            fxCtrl.SetBoneEffect(effect.boneName, effect.effectName, actorInfo.ModelScale);
                        }
                    }
                    else
                    {
                        if ((actorInfo.ConfigID - 1) * 9 + effect.effectLev <= GameCenter.newMountMng.CurLev)
                        {
                            if (!string.IsNullOrEmpty(effect.boneName) && !string.IsNullOrEmpty(effect.effectName))
                            {
                                fxCtrl.SetBoneEffect(effect.boneName, effect.effectName, actorInfo.ModelScale);
                            }
                        }
                    }
                }
            }
            fxCtrl.ShowBoneEffect(true);
        }
    }
示例#3
0
 protected void UpdateMountEffect()
 {
     if (MountKind == MountType.SKINLIST)
     {
         ProcessLevEffect();
     }
     else
     {
         for (int i = 0; i < MountEffectList.Count; i++)
         {
             MountEffect item = MountEffectList[i];
             if ((ConfigID - 1) * 9 + item.effectLev <= Lev)
             {
                 ProcessLevEffect();
             }
         }
     }
 }
示例#4
0
 protected void ProcessLevEffect()
 {
     boneEffectList.Clear();
     //Debug.Log("  ProcessLevEffect  " + ConfigID + "  lev : " + Lev);
     for (int i = 0; i < MountEffectList.Count; i++)
     {
         MountEffect item = MountEffectList[i];
         if (MountKind == MountType.SKINLIST)
         {
             boneEffectList.Add(new BoneEffectRef(item.boneName, item.effectName));
         }
         else
         {
             if ((ConfigID - 1) * 9 + item.effectLev <= Lev)
             {
                 boneEffectList.Add(new BoneEffectRef(item.boneName, item.effectName));
             }
         }
     }
     if (OnEffectChangeEvent != null)
     {
         OnEffectChangeEvent(Lev);
     }
 }