protected void HitCallback(MoverLighting 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); } } }
public void MakeMove(ActLighting obj, Character src, Character dst, HitCallbackLighting onTriggerEnter) { MoverLighting mover = new MoverLighting(obj, src, dst, onTriggerEnter); mMovers.Add(mover); }