Exemplo n.º 1
0
        public override void Write(JsonData jsNode)
        {
            base.Write(jsNode);

            jsNode["fx_name"]     = EffectUtil.GetFxPath(fx_name);
            jsNode["target_name"] = target_name;
            jsNode["speed"]       = speed;
            jsNode["acce"]        = acce;
            jsNode["len"]         = len;

            jsNode["height"]   = height;
            jsNode["z_offset"] = z_offset;

            if (offset_pos.x != 0.0f)
            {
                jsNode["x"] = offset_pos.x;
            }

            if (offset_pos.y != 0.0f)
            {
                jsNode["y"] = offset_pos.y;
            }

            if (offset_pos.z != 0.0f)
            {
                jsNode["z"] = offset_pos.z;
            }
            jsNode["attach_name"]    = attach_name;
            jsNode["target_hitnode"] = target_hitnode;
        }
Exemplo n.º 2
0
        public override void Write(JsonData jsNode)
        {
            base.Write(jsNode);

            jsNode["attach_name"] = attach_name;
            jsNode["fx_name"]     = EffectUtil.GetFxPath(fx_name);

            if (only_main_role == true)
            {
                jsNode["only_main_role"] = only_main_role;
            }

            if (offset_pos.x != 0.0f)
            {
                jsNode["x"] = offset_pos.x;
            }

            if (offset_pos.y != 0.0f)
            {
                jsNode["y"] = offset_pos.y;
            }

            if (offset_pos.z != 0.0f)
            {
                jsNode["z"] = offset_pos.z;
            }

            if (scale != 1.0f)
            {
                jsNode["scale"] = scale;
            }
        }
Exemplo n.º 3
0
        public override void Write(JsonData jsNode)
        {
            base.Write(jsNode);

            jsNode["fx_name"] = EffectUtil.GetFxPath(fx_name);

            if (position.x != 0.0f)
            {
                jsNode["px"] = position.x;
            }

            if (position.y != 0.0f)
            {
                jsNode["py"] = position.y;
            }

            if (position.z != 0.0f)
            {
                jsNode["pz"] = position.z;
            }

            if (rotation.x != 0.0f)
            {
                jsNode["rx"] = rotation.x;
            }

            if (rotation.y != 0.0f)
            {
                jsNode["ry"] = rotation.y;
            }

            if (rotation.z != 0.0f)
            {
                jsNode["rz"] = rotation.z;
            }

            if (by_target)
            {
                jsNode["by_target"] = by_target;
            }

            if (scale != 1.0f)
            {
                jsNode["scale"] = scale;
            }
        }
Exemplo n.º 4
0
        public override void Play(ISkillAttacker attacker, SkillEffect se)
        {
            GameObject damage_obj = new GameObject("damage_obj");

            MultHitNodeProp prop = m_NodeProp as MultHitNodeProp;

            if (prop == null)
            {
                return;
            }

            if (prop.attach)
            {
                damage_obj.transform.parent = attacker.GetRoot();
            }
            else
            {
                damage_obj.transform.parent = helper.PlaceFxRoot;
            }

            EffectUtil.ResetLocalTransform(damage_obj.transform);

            damage_obj.transform.localPosition = prop.position;

            MultHitHandle handle = damage_obj.AddComponent <MultHitHandle>();

            handle.m_attacker = attacker;
            //handle.m_damageRaduis = radius;
            handle.m_hitTimes  = prop.hit_times;
            handle.m_deltaTime = prop.delta_time;

            // if (follow == false)
            // {
            //     damage_obj.transform.parent = Util.PlaceFxRoot;

            //     if (callback == null || by_target == false)
            //         damage_obj.transform.localPosition = caster.transform.TransformPoint(position);//caster.transform.position + position;
            //     else
            //         damage_obj.transform.localPosition = callback.GetAttackTarget().transform.position;
            // }
            // else
            // {
            //     damage_obj.transform.parent = caster.transform;
            //     Util.ResetLocalTransform(damage_obj.transform);
            //     damage_obj.transform.localPosition = position;
            // }

            //// Debug.LogWarning(caster);

            // PlaceDamageHandle handler = damage_obj.AddComponent<PlaceDamageHandle>();
            // handler.m_Owner = caster;
            // handler.m_timeLen = time_len;
            // handler.m_deltaTime = delta_time;


            // handler.m_damageRaduis = radius;

            // handler.m_push = push;
            // handler.m_hitIndex = hit_index;
            // handler.m_hitNode = this;

            // handler.m_callback = callback;
        }
Exemplo n.º 5
0
 public static void AttachNode(Transform parent, Transform child)
 {
     child.parent = parent;
     EffectUtil.ResetLocalTransform(child);
 }