Example #1
0
 protected void OnHitCallback(MoverBase mover, Collider other, Character cc)
 {
     ActHelper.RunChildrenInNewTree(this, (tree) =>
     {
         for (int i = 0; i < tree.Children.Count; i++)
         {
             tree.Children[i].ApplyHitPoint = other.ClosestPoint(mover.CacheTransform.position);
             tree.Children[i].ApplyHitDir   = mover.CacheTransform.forward;
             tree.Children[i].AddInAttackList(cc);
         }
         if (PassBody == false)
         {
             mover.Release();
         }
     });
 }
Example #2
0
        protected void HitCallback(MoverBeam mover)
        {
            if (mover.DstCharacter == null)
            {
                return;
            }
            ActHelper.RunChildrenInNewTree(this, (tree) =>
            {
                for (int i = 0; i < tree.Children.Count; i++)
                {
                    tree.Children[i].ApplyHitPoint = mover.DstCharacter.Avatar.GetBindPosition(TargetBind);
                    tree.Children[i].ApplyHitDir   = mover.CacheTransform.forward;
                    tree.Children[i].AddInAttackList(mover.DstCharacter);
                }
            });

            if (mCurrAttackList.Count >= MaxCount)
            {
                return;
            }

            List <Character> list = Skill.Caster.GetAffectCharacters(Affect, false);

            for (int i = 0; i < list.Count; i++)
            {
                Character cc = list[i];
                if (mCurrAttackList.Contains(cc))
                {
                    continue;
                }
                mCurrAttackList.Add(cc);
                if (GTTools.GetHorizontalDistance(cc.Pos, mover.DstCharacter.Pos) < MaxBounceDis)
                {
                    GTWorld.Instance.Act.MakeMove(this, mover.DstCharacter, cc, HitCallback);
                }
            }
        }