Exemplo n.º 1
0
        protected override bool MakeResult(Character cc)
        {
            EffectData unit = null;

            if (cc == null)
            {
                return(false);
            }
            Transform p = cc.Avatar.GetBindTransform(Bind);

            unit = GTWorld.Instance.Ect.LoadEffect(ID, 0, Retain);
            unit.CacheTransform.parent           = p;
            unit.CacheTransform.localPosition    = Offset;
            unit.CacheTransform.localEulerAngles = Euler;
            unit.CacheTransform.parent           = null;

            unit.Release(Duration);
            ActTree item = Clone <ActTree>(this);

            item.Skill  = this.Skill;
            item.StTime = 0;
            item.EdTime = 0;
            item.Clear();
            for (int i = 0; i < item.Children.Count; i++)
            {
                item.Children[i].ApplyCenter   = unit.CacheTransform;
                item.Children[i].ApplyHitPoint = unit.CacheTransform.position;
            }
            GTWorld.Instance.Act.Run(item);
            return(true);
        }
Exemplo n.º 2
0
        public static void RunChildrenInNewTree(ActItem src, Callback <ActTree> initTreeCallback)
        {
            ActTree tree = new ActTree();

            for (int i = 0; i < src.Children.Count; i++)
            {
                ActItem child = ActItem.Clone(src.Children[i]);
                tree.AddChild(child);
            }
            tree.Skill = src.Skill;
            if (initTreeCallback != null)
            {
                initTreeCallback.Invoke(tree);
            }
            GTWorld.Instance.Act.Run(tree);
        }