Exemple #1
0
 public void Apply(SkEntity entity, SkRuntimeInfo info)
 {
     if (_seId > 0)
     {
         entity.ApplySe(_seId, info);
     }
     if (_repelEff)
     {
         entity.ApplyRepelEff(info);
     }
     if (_emitId > 0)
     {
         entity.ApplyEmission(_emitId, info);
     }
     if (_anms.Length > 0)
     {
         entity.ApplyAnim(PickAnim(entity, info), info);
     }
     foreach (int eid in _effId)
     {
         if (eid > 0)
         {
             entity.ApplyEff(eid, info);
         }
     }
     if (_camEffId > 0)
     {
         entity.ApplyCamEff(_camEffId, info);
     }
     if (_procEffId > 0)
     {
         SkEffExFunc.Apply(_procEffId, entity, info);
     }
 }
Exemple #2
0
        internal void TryApplyEachEffOfMain(int idx, SkEntity tar, SkRuntimeInfo skrt)
        {
            SkEffect eff = idx < _effMainEachTime.Length ? _effMainEachTime [idx] : _effMainEachTime [_effMainEachTime.Length - 1];

            if (eff != null)
            {
                eff.Apply(tar, skrt);
            }
        }
Exemple #3
0
        static void DoEff2(SkEntity entity, SkRuntimeInfo info)
        {
            // Add code
            SkBuffInst buff = info as SkBuffInst;

            if (null != buff)
            {
                entity.OnBuffRemove(buff._buff._id);
            }
        }
Exemple #4
0
        internal static void Apply(int procEffId, SkEntity entity, SkRuntimeInfo info)
        {
            switch (procEffId)
            {
            case 1:
                DoEff1(entity, info);
                break;

            case 2:
                DoEff2(entity, info);
                break;

            default:
                break;
            }
        }
Exemple #5
0
        private string PickAnim(SkEntity entity, SkRuntimeInfo info)
        {
            SkInst inst = info as SkInst;

            if (inst != null)
            {
                switch (_anms [0].ToLower())
                {
                case "rnd":
                    return(_anms [SkInst.s_rand.Next(1, _anms.Length)]);

                case "inc":
                {
                    int idx = inst.GuideCnt - 1;
                    idx %= (_anms.Length - 1);
                    return(_anms [idx + 1]);                            //1+(GuideCnt-1)
                }

                case "dir":
                    return(_anms [1 + inst.GetAtkDir()]);
                }
            }
            return(_anms[0]);
        }
Exemple #6
0
 public virtual void ApplyRepelEff(SkRuntimeInfo info)
 {
 }
Exemple #7
0
 public virtual void ApplyCamEff(int effId, SkRuntimeInfo info)
 {
 }
Exemple #8
0
 public virtual void ApplyEmission(int emitId, SkRuntimeInfo info)
 {
 }
Exemple #9
0
 public virtual void ApplyAnim(string anim, SkRuntimeInfo info)
 {
 }
Exemple #10
0
 // Virtuals Methods
 public virtual void ApplySe(int seId, SkRuntimeInfo info)
 {
 }