Esempio n. 1
0
    public void onBullet_3003(Vector3 pos, Quaternion rotation)
    {
        //冰雹术
        pos.z += UnityEngine.Random.Range(-3f, 3f);
        pos.x += UnityEngine.Random.Range(-3f, 3f);
        pos.y  = 16f + pos.y;

        GameObject bult = GameObject.Instantiate(P3Mage_Event.MAGE_B3, pos, rotation) as GameObject;

        bult.transform.SetParent(U3DAPI.FX_POOL_TF, false);

        Transform real_track = bult.transform.FindChild("t");

        if (real_track != null)
        {
            HitData hd = Link_PRBullet(3003, 2f, bult, real_track);

            hd.m_nHurtSP_type = 11;
            hd.m_nHurtSP_pow  = 1;
            hd.m_nDamage      = 177;

            //hd.m_Color_Main = Color.blue;
            hd.m_Color_Main = SkillModel.getskill_mcolor(3003);
            // hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(3003);
            hd.m_aniTrack  = real_track.GetComponent <Animator>();
            real_track.gameObject.layer = EnumLayer.LM_BT_FIGHT;

            Transform real_fx = real_track.FindChild("f");
            if (real_fx != null)
            {
                hd.m_aniFx = real_fx.GetComponent <Animator>();
            }
        }
    }
    void skill_3002()
    {
        cur_3002_num++;

        Vector3 pos = cur_3002_pos + cur_3002_forward * 2f * cur_3002_num;

        float x = UnityEngine.Random.Range(0f, 1f);
        float z = UnityEngine.Random.Range(0f, 1f);

        pos.x = pos.x + x;
        pos.z = pos.z + z;

        GameObject fx_inst = GameObject.Instantiate(MAGE_S3002, pos, transform.rotation) as GameObject;

        fx_inst.transform.SetParent(U3DAPI.FX_POOL_TF, false);
        Destroy(fx_inst, 0.5f);

        HitData hd = m_monRole.Build_PRBullet(3002, 1.0f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

        hd.m_nDamage = 1088;
        // hd.m_Color_Main = Color.gray;
        hd.m_Color_Main = SkillModel.getskill_mcolor(3002);
        //hd.m_Color_Rim = Color.white;
        hd.m_Color_Rim = SkillModel.getskill_rcolor(3002);

        hd.m_nHurtFX = 1;

        if (cur_3002_num >= 6)
        {
            CancelInvoke("skill_3002");
        }
    }
    void skill_3007_1()
    {
        cur_3007_1_time++;
        Vector3 pos = transform.position + transform.forward * 2f;
        HitData hd  = m_monRole.Build_PRBullet(3007, 0.3f, SceneTFX.m_Bullet_Prefabs[6], pos, transform.rotation);

        hd.m_nDamage = 88;
        // hd.m_Color_Main = Color.gray;
        hd.m_Color_Main = SkillModel.getskill_mcolor(3007);
        // hd.m_Color_Rim = Color.white;
        hd.m_Color_Rim = SkillModel.getskill_rcolor(3007);
        //hd.m_nHurtSP_type = 13;
        //hd.m_nHurtSP_pow = 4;

        if (cur_3007_1_time >= 5)
        {
            CancelInvoke("skill_3007_1");
        }
    }
    void skill_3002()
    {
        cur_3002_num++;

        Vector3 pos = cur_3002_pos + cur_3002_forward * 2f * cur_3002_num;

        float x = UnityEngine.Random.Range(0f, 1f);
        float z = UnityEngine.Random.Range(0f, 1f);

        pos.x = pos.x + x;
        pos.z = pos.z + z;

        GameObject fx_inst = GameObject.Instantiate(MAGE_S3002, pos, transform.rotation) as GameObject;

        if (SceneCamera.m_nSkillEff_Level > 1)
        {//隐藏部分特效
            Transform hide = fx_inst.transform.FindChild("hide");
            if (hide != null)
            {
                hide.gameObject.SetActive(false);
            }
        }
        fx_inst.transform.SetParent(U3DAPI.FX_POOL_TF, false);
        Destroy(fx_inst, 1.5f);

        HitData hd = m_linkProfessionRole.Build_PRBullet(3002, 1.0f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

        hd.m_nDamage = 1088;
        // hd.m_Color_Main = Color.gray;
        hd.m_Color_Main = SkillModel.getskill_mcolor(3002);
        //hd.m_Color_Rim = Color.white;
        hd.m_Color_Rim = SkillModel.getskill_rcolor(3002);
        hd.m_nHurtFX   = 1;

        if (cur_3002_num >= 6)
        {
            CancelInvoke("skill_3002");
        }
    }
    public void onBullet(int id)
    {
        if (m_monRole is M000P3 || m_monRole is ohterP3Mage)
        {
            if (id == 1)
            {
                Vector3 pos = transform.position + transform.forward * 0.5f;
                pos.y += 1.25f;

                GameObject bult = GameObject.Instantiate(MAGE_B1, pos, transform.rotation) as GameObject;
                bult.transform.SetParent(U3DAPI.FX_POOL_TF, false);

                Transform real_track = bult.transform.FindChild("t");
                if (real_track != null)
                {
                    HitData hd = m_monRole.Link_PRBullet(3001, 2f, bult, real_track);

                    //hd.m_Color_Main = Color.gray;
                    hd.m_Color_Main = SkillModel.getskill_mcolor(3001);
                    // hd.m_Color_Rim = Color.white;
                    hd.m_Color_Rim = SkillModel.getskill_rcolor(3001);
                    hd.m_nDamage   = 277;

                    hd.m_aniTrack = real_track.GetComponent <Animator>();
                    real_track.gameObject.layer = EnumLayer.LM_BT_FIGHT;

                    Transform real_fx = real_track.FindChild("f");
                    if (real_fx != null)
                    {
                        hd.m_aniFx = real_fx.GetComponent <Animator>();
                    }
                }
            }
            if (id == 2)
            {
                Vector3 pos = transform.position;
                pos.y += 1f + UnityEngine.Random.Range(0f, 1f);
                if (UnityEngine.Random.Range(0, 16) > 7)
                {
                    pos += transform.right * (0.5f + UnityEngine.Random.Range(0f, 1f));
                }
                else
                {
                    pos -= transform.right * (0.5f + UnityEngine.Random.Range(0f, 1f));
                }

                GameObject bult = GameObject.Instantiate(MAGE_B2, pos, transform.rotation) as GameObject;
                bult.transform.SetParent(U3DAPI.FX_POOL_TF, false);

                Transform real_track = bult.transform.FindChild("t");
                if (real_track != null)
                {
                    HitData hd = m_monRole.Link_PRBullet(3005, 2f, bult, real_track);
                    hd.m_Color_Main = SkillModel.getskill_mcolor(3005);
                    hd.m_Color_Rim  = SkillModel.getskill_rcolor(3005);

                    hd.m_nHurtSP_type = 11;
                    hd.m_nHurtSP_pow  = 1;

                    hd.m_aniTrack = real_track.GetComponent <Animator>();
                    real_track.gameObject.layer = EnumLayer.LM_BT_FIGHT;

                    Transform real_fx = real_track.FindChild("f");
                    if (real_fx != null)
                    {
                        hd.m_aniFx = real_fx.GetComponent <Animator>();
                    }
                }
            }
            if (id == 101)
            {
                Vector3 pos = transform.position;

                HitData hd = m_monRole.Build_PRBullet(3004, 0.125f, SceneTFX.m_Bullet_Prefabs[7], pos, transform.rotation);
                hd.m_nDamage = 288;
                //hd.m_Color_Main = Color.blue;
                hd.m_Color_Main = SkillModel.getskill_mcolor(3004);
                // hd.m_Color_Rim = Color.cyan;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(3004);
                hd.m_nHurtFX   = 1;

                hd.m_nHurtSP_type = 11;
                hd.m_nHurtSP_pow  = 2;
            }
            if (3006 == id)
            {
                if (m_monRole.m_LockRole == null)
                {
                    return;
                }

                Vector3 pos = m_monRole.m_LockRole.m_curModel.position;
                pos.z += UnityEngine.Random.Range(-2f, 2f);
                pos.x += UnityEngine.Random.Range(-2f, 2f);
                pos.y  = pos.y + 8f;

                GameObject bult = GameObject.Instantiate(P3Mage_Event.MAGE_B6, pos, transform.rotation) as GameObject;
                bult.transform.SetParent(U3DAPI.FX_POOL_TF, false);

                Transform real_track = bult.transform.FindChild("t");
                if (real_track != null)
                {
                    HitData hd = m_monRole.Link_PRBullet(3006, 3.0f, bult, real_track);

                    hd.m_nHurtSP_type = 11;
                    hd.m_nHurtSP_pow  = 1;

                    //陨石要穿过角色直到地面爆开
                    hd.m_bOnlyHit = false;

                    // hd.m_Color_Main = Color.blue;
                    hd.m_Color_Main = SkillModel.getskill_mcolor(3006);
                    // hd.m_Color_Rim = Color.white;
                    hd.m_Color_Rim = SkillModel.getskill_rcolor(3006);
                    hd.m_aniTrack  = real_track.GetComponent <Animator>();
                    real_track.gameObject.layer = EnumLayer.LM_BT_FIGHT;

                    Transform real_fx = real_track.FindChild("f");
                    if (real_fx != null)
                    {
                        hd.m_aniFx = real_fx.GetComponent <Animator>();
                    }
                }
            }
            if (3002 == id)
            {
                cur_3002_num     = 0;
                cur_3002_forward = transform.forward;
                cur_3002_pos     = transform.position;

                CancelInvoke("skill_3002");
                InvokeRepeating("skill_3002", 0, 0.2f);
            }
            if (3009 == id)
            {
                Vector3 pos = transform.position + transform.forward * 3.5f;

                HitData hd = m_monRole.Build_PRBullet(3009, 0.125f, SceneTFX.m_Bullet_Prefabs[7], pos, transform.rotation);
                hd.m_nDamage = 288;
                //hd.m_Color_Main = Color.white;
                hd.m_Color_Main = SkillModel.getskill_mcolor(3009);
                // hd.m_Color_Rim = new Color(0.02f, 0.73f, 0.92f, 0.51f);
                hd.m_Color_Rim    = SkillModel.getskill_rcolor(3009);
                hd.m_nHurtSP_type = 31;
                hd.m_nHurtSP_pow  = 2;
            }

            if (30071 == id)
            {
                Vector3 pos = transform.position + transform.forward * 7f;
                HitData hd  = m_monRole.Build_PRBullet(3007, 3.5f, SceneTFX.m_Bullet_Prefabs[8], pos, transform.rotation);
                hd.m_nDamage = 0;
                //hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(3007);
                //hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim   = SkillModel.getskill_rcolor(3007);
                pos.y           += 1f;
                hd.m_nHurtSP_pos = pos;

                hd.m_nHurtSP_type = 14;
                hd.m_nHurtSP_pow  = 4;
                hd.m_hurtNum      = 0;
            }
            if (30072 == id)
            {
                cur_3007_1_time = 0;
                CancelInvoke("skill_3007_1");
                InvokeRepeating("skill_3007_1", 0, 0.4f);
            }
            if (30073 == id)
            {
                cur_3007_2_time = 0;
                CancelInvoke("skill_3007_2");
                InvokeRepeating("skill_3007_2", 0, 0.4f);
            }
            if (30111 == id)
            {
                m_cur_ball_30111.Clear();

                if (m_monRole == null)
                {
                    return;
                }

                ball_30111_pos   = m_monRole.m_LockRole.m_curModel.position;
                ball_30111_hight = m_monRole.m_LockRole.headOffset.y / 2;
                ball_3011_dis    = Vector3.Distance(transform.position, m_monRole.m_LockRole.m_curModel.position);

                GameObject fx_inst = GameObject.Instantiate(MAGE_S3011, transform.position, transform.rotation) as GameObject;
                fx_inst.transform.SetParent(U3DAPI.FX_POOL_TF, false);

                for (int i = 1; i <= fx_inst.transform.FindChild("heiqiu").childCount; i++)
                {
                    m_cur_ball_30111.Add(fx_inst.transform.FindChild("heiqiu/0" + i));
                }

                GameObject.Destroy(fx_inst, 6);
            }
            if (30112 == id)
            {
                if (m_monRole.m_LockRole != null)
                {
                    m_monRole.TurnToRole(m_monRole.m_LockRole, false);
                    //m_cur_ball_30111.Clear();
                    //return;
                }

                if (m_cur_ball_30111.Count == 0)
                {
                    return;
                }

                //float dis = Vector3.Distance(transform.position, m_linkProfessionRole.m_LockRole.m_curModel.position);
                //float high = m_linkProfessionRole.m_LockRole.headOffset.y / 2;
                for (int i = 0; i < m_cur_ball_30111.Count; i++)
                {
                    Transform one = m_cur_ball_30111[i];
                    one.GetComponent <Animator>().enabled = false;
                    Transform ball     = one.FindChild("top/heiqiu (1)");
                    Vector3   pos_ball = ball.localPosition;
                    ball.transform.DOLocalMove(pos_ball / 3, 0.35f).SetDelay(0.1f * (int)(i + 1) / 2);
                    Tweener tween1 = one.transform.DOLocalMove(new Vector3(0, ball_30111_hight, ball_3011_dis), 0.35f + ball_3011_dis * 0.01f).SetDelay(0.1f * i);
                    tween1.SetUpdate(true);
                    int rang = UnityEngine.Random.Range(0, 5);
                    switch (rang)
                    {
                    case 1:
                        tween1.SetEase(Ease.OutQuad);
                        break;

                    case 2:
                        tween1.SetEase(Ease.OutCirc);
                        break;

                    case 3:
                        tween1.SetEase(Ease.OutCubic);
                        break;

                    case 4:
                        tween1.SetEase(Ease.OutExpo);
                        break;

                    case 5:
                        tween1.SetEase(Ease.OutElastic);
                        break;
                    }
                    tween1.OnComplete(delegate()
                    {
                        ball.gameObject.SetActive(false);
                        GameObject fx_inst = GameObject.Instantiate(MAGE_S3011_1) as GameObject;
                        fx_inst.transform.SetParent(one, false);

                        HitData hd = m_monRole.Build_PRBullet(3004, 0.125f, SceneTFX.m_Bullet_Prefabs[1],
                                                              ball_30111_pos, transform.rotation);
                        hd.m_nDamage = 288;
                    });
                    if (i == m_cur_ball_30111.Count - 1)
                    {
                        m_cur_ball_30111.Clear();
                    }
                }
            }
        }
        else if (m_monRole is M000P2 || m_monRole is ohterP2Warrior)
        {
            if (id == 1)
            {
                Vector3 pos = transform.position + transform.forward * 1.5f;
                HitData hd  = m_monRole.Build_PRBullet(2001, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

                hd.m_nDamage = 108;
                // hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2001);
                //hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(2001);
                hd.m_nHurtFX   = 2;
            }

            if (id == 2)
            {
                Vector3 pos = transform.position + transform.forward * 1.5f;
                HitData hd  = m_monRole.Build_PRBullet(2001, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);
                hd.m_nDamage = 128;
                // hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2001);
                //hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(2001);
                hd.m_nHurtFX   = 2;
            }

            if (id == 3)
            {
                Vector3 pos = transform.position + transform.forward * 2.5f;
                HitData hd  = m_monRole.Build_PRBullet(2001, 0.125f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);
                hd.m_nDamage = 188;
                //hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2001);
                // hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(2001);
                //hd.m_nHurtSP_type = 1;
                //hd.m_nHurtSP_pow = 3;

                hd.m_nHurtFX = 2;

                hd.m_nHurtSP_type = 11;
                hd.m_nHurtSP_pow  = 3;

                hd.m_nLastHit = 1;
            }
            if (id == 4)
            {
                Vector3 pos = transform.position;// +transform.forward * 1.5f;
                HitData hd  = m_monRole.Build_PRBullet(2003, 0.125f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);
                hd.m_nDamage = 88;
                //hd.m_Color_Main = Color.red;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2003);
                //hd.m_Color_Rim = Color.red;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(2003);
                hd.m_nHurtFX   = 3;
            }
            if (id == 21)
            {
                Vector3 pos = transform.position + transform.forward * 4f;
                HitData hd  = m_monRole.Build_PRBullet(2004, 0.2f, SceneTFX.m_Bullet_Prefabs[6], pos, transform.rotation);
                hd.m_nDamage = 388;
                //hd.m_Color_Main = Color.red;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2004);
                // hd.m_Color_Rim = Color.red;
                hd.m_Color_Rim    = SkillModel.getskill_rcolor(2004);
                hd.m_nHurtSP_type = 1;
                hd.m_nHurtSP_pow  = 4;
            }
            if (13 == id)
            {
                if (m_monRole.m_LockRole != null)
                {
                    Vector3 pos = transform.position + transform.forward * 0.5f;
                    pos.y += 1.25f;

                    HitData hd = m_monRole.Build_PRBullet(2004, 0f, WARRIOR_B1, pos, transform.rotation);

                    FollowBullet_Mgr.AddBullet(m_monRole.m_LockRole, hd, 0.8f);
                }
            }
            if (141 == id)
            {
                Vector3 pos = transform.position + transform.forward * 3.0f;
                HitData hd  = m_monRole.Build_PRBullet(2002, 0.3f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);

                hd.m_nDamage = 108;
                //hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2002);
                //hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(2002);
                hd.m_nHurtFX   = 2;
            }
            if (142 == id)
            {
                Vector3 pos = transform.position + transform.forward * 6.0f;
                HitData hd  = m_monRole.Build_PRBullet(2002, 0.3f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);

                hd.m_nDamage = 88;
                //hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2002);
                // hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(2002);
                hd.m_nHurtFX   = 2;
            }

            if (143 == id)
            {
                Vector3 pos = transform.position + transform.forward * 4.0f;
                HitData hd  = m_monRole.Build_PRBullet(2002, 0.2f, SceneTFX.m_Bullet_Prefabs[6], pos, transform.rotation);

                hd.m_nDamage = 188;
                // hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2002);
                //hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(2002);
                hd.m_nHurtFX   = 2;

                //有拉到Cast面前的效果
                hd.m_nHurtSP_type = 21;
                hd.m_nHurtSP_pow  = 4;
            }
            if (2009 == id)
            {
                Vector3 pos = transform.position + transform.forward * 3f;
                HitData hd  = m_monRole.Build_PRBullet(2009, 0.2f, SceneTFX.m_Bullet_Prefabs[5], pos, transform.rotation);
                hd.m_nDamage = 88;
                // hd.m_Color_Main = Color.red;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2009);
                // hd.m_Color_Rim = Color.red;
                hd.m_Color_Rim    = SkillModel.getskill_rcolor(2009);
                hd.m_nHurtSP_type = 11;
                hd.m_nHurtSP_pow  = 4;

                hd.m_nHurtFX = 6;
            }
            if (2006 == id)
            {
                Vector3 pos = transform.position /* + transform.forward * 3f*/;
                HitData hd  = m_monRole.Build_PRBullet(2006, 0.2f, SceneTFX.m_Bullet_Prefabs[6], pos, transform.rotation);
                hd.m_nDamage = 88;
                // hd.m_Color_Main = Color.red;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2006);
                //hd.m_Color_Rim = Color.red;
                hd.m_Color_Rim    = SkillModel.getskill_rcolor(2006);
                hd.m_nHurtSP_type = 11;
                hd.m_nHurtSP_pow  = 4;

                hd.m_nHurtFX = 6;
            }
            if (2007 == id)
            {
                Vector3 pos = transform.position + transform.forward * 1f;
                HitData hd  = m_monRole.Build_PRBullet(2007, 0.3f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);
                hd.m_nDamage = 88;
                // hd.m_Color_Main = Color.red;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2007);
                //hd.m_Color_Rim = Color.red;
                hd.m_Color_Rim    = SkillModel.getskill_rcolor(2007);
                hd.m_nHurtSP_type = 11;
                hd.m_nHurtSP_pow  = 10;

                hd.m_nHurtFX = 3;
            }
        }
        else if (m_monRole is M000P5 || m_monRole is ohterP5Assassin)
        {
            if (id == 1)
            {
                Vector3 pos = transform.position + transform.forward * 1.5f;
                pos.y += 1f;
                HitData hd = m_monRole.Build_PRBullet(5001, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

                // hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5001);
                // hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5001);
                hd.m_nHurtFX   = 2;
            }

            if (id == 2)
            {
                Vector3 pos = transform.position + transform.forward * 1.5f;
                pos.y += 1f;

                HitData hd = m_monRole.Build_PRBullet(5001, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);
                // hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5001);
                // hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim    = SkillModel.getskill_rcolor(5001);
                hd.m_nHurtSP_type = 1;
                hd.m_nHurtSP_pow  = 2;

                hd.m_nHurtFX = 2;
            }

            if (id == 3)
            {
                Vector3 pos = transform.position + transform.forward * 2.5f;
                pos.y += 1f;

                HitData hd = m_monRole.Build_PRBullet(5001, 0.125f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);
                //hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5001);
                // hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5001);
                hd.m_nHurtFX   = 2;

                hd.m_nLastHit = 1;
            }

            //刺客的疾风连刺
            if (id == 50021)
            {
                Vector3 pos = transform.position + transform.forward * 1.5f;
                pos.y += 1f;

                HitData hd = m_monRole.Build_PRBullet(5002, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

                hd.m_nDamage = 58;
                // hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5002);
                //hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5002);
                hd.m_nHurtFX   = 4;
            }

            //刺客的疾风连刺
            if (id == 50022)
            {
                Vector3 pos = transform.position + transform.forward * 1.5f;
                pos.y += 1f;

                HitData hd = m_monRole.Build_PRBullet(5002, 0.125f, SceneTFX.m_Bullet_Prefabs[5], pos, transform.rotation);

                hd.m_nDamage = 138;
                //hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5002);
                //hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5002);
                hd.m_nHurtFX   = 5;

                hd.m_nHurtSP_type = 11;
                hd.m_nHurtSP_pow  = 3;

                hd.m_nLastHit = 1;
            }

            //刺客的疾风乱舞
            if (id == 5)
            {
                Vector3 pos = transform.position;
                pos.y += 1f;

                HitData hd = m_monRole.Build_PRBullet(5003, 0.125f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);

                hd.m_nDamage = 57;
                // hd.m_Color_Main = Color.blue;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5003);
                // hd.m_Color_Rim = Color.cyan;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5003);
                hd.m_nHurtFX   = 5;
            }

            //(影袭)
            if (id == 50041)
            {
                Vector3 pos = transform.position + transform.forward * 1.5f;
                pos.y += 1f;
                HitData hd = m_monRole.Build_PRBullet(5004, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

                // hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5004);
                //hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5004);
                hd.m_nHurtFX   = 4;
            }

            //(影袭)
            if (id == 50042)
            {
                Vector3 pos = transform.position + transform.forward * 1.5f;
                pos.y += 1f;
                HitData hd = m_monRole.Build_PRBullet(5004, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

                //hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5004);
                // hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5004);
                hd.m_nLastHit  = 1;
                hd.m_nHurtFX   = 5;
            }

            //特殊处理瞬移到敌人身后(影袭)
            if (131 == id)
            {
                if (m_monRole.m_LockRole != null)
                {
                    Vector3 dis_pos = m_monRole.m_curModel.position - m_monRole.m_LockRole.m_curModel.position;
                    if (dis_pos.magnitude < 4f)
                    {
                        m_monRole.m_curModel.position = m_monRole.m_LockRole.m_curModel.position - m_monRole.m_LockRole.m_curModel.forward * 4f;
                        m_monRole.m_curModel.forward  = m_monRole.m_LockRole.m_curModel.forward;
                    }
                }

                //m_monRole.m_curModel.position = hd.m_CastRole.m_curModel.position + hd.m_CastRole.m_curModel.forward * 2f;
            }

            //幻影杀阵
            if (50071 == id)
            {
                Vector3 pos = transform.position;
                //pos.y += 1f;
                HitData hd = m_monRole.Build_PRBullet(5007, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

                //hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5007);
                //  hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5007);
                hd.m_nHurtFX   = 5;
            }
            if (50072 == id)
            {
                Vector3 pos = transform.position;
                //pos.y += 1f;
                HitData hd = m_monRole.Build_PRBullet(5007, 0.125f, SceneTFX.m_Bullet_Prefabs[7], pos, transform.rotation);

                //hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5007);
                // hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5007);
                hd.m_nHurtFX   = 1;
            }
            if (5006 == id)
            {
                Vector3 pos = transform.position;
                HitData hd  = m_monRole.Build_PRBullet(5006, 1.0f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

                //hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5006);
                // hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5006);
                hd.m_nHurtFX   = 2;
            }
            if (5009 == id)
            {
                if (m_monRole.m_LockRole != null)
                {//闪现过去后朝向目标
                    m_monRole.TurnToRole(m_monRole.m_LockRole, false);
                }

                Vector3 pos = transform.position;
                HitData hd  = m_monRole.Build_PRBullet(5009, 1.0f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

                // hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5009);
                // hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5009);
                hd.m_nHurtFX   = 2;
            }
        }
        else
        {
            if (1 == id)
            {
                //普通攻击技能
                Vector3 pos = transform.position + transform.forward * 2f;
                pos.y += 1f;

                HitData hd = m_monRole.BuildBullet(1, 0.125f, SceneTFX.m_Bullet_Prefabs[1], pos, transform.rotation);
                if (!m_monRole.isfake)
                {
                    hd.m_nDamage = 0;
                }
            }
        }
    }
    //加入碰撞点
    public void onBullet(int id)
    {
        if (m_linkProfessionRole.getShowSkillEff() == 2)
        {
            return;
        }


        //法师的陨石术
        if (3006 == id)
        {
            if (m_linkProfessionRole.m_LockRole == null)
            {
                return;
            }

            Vector3 pos = m_linkProfessionRole.m_LockRole.m_curModel.position;
            pos.z += UnityEngine.Random.Range(-2f, 2f);
            pos.x += UnityEngine.Random.Range(-2f, 2f);
            pos.y  = pos.y + 8f;

            GameObject bult = GameObject.Instantiate(P3Mage_Event.MAGE_B6, pos, transform.rotation) as GameObject;
            bult.transform.SetParent(U3DAPI.FX_POOL_TF, false);

            Transform real_track = bult.transform.FindChild("t");
            if (real_track != null)
            {
                HitData hd = m_linkProfessionRole.Link_PRBullet(3006, 3.0f, bult, real_track);

                hd.m_nHurtSP_type = 11;
                hd.m_nHurtSP_pow  = 1;

                //陨石要穿过角色直到地面爆开
                hd.m_bOnlyHit = false;

                // hd.m_Color_Main = Color.red;
                hd.m_Color_Main = SkillModel.getskill_mcolor(3006);
                // hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(3006);
                hd.m_aniTrack  = real_track.GetComponent <Animator>();
                real_track.gameObject.layer = EnumLayer.LM_BT_FIGHT;

                Transform real_fx = real_track.FindChild("f");
                if (real_fx != null)
                {
                    hd.m_aniFx = real_fx.GetComponent <Animator>();
                }
            }
        }

        //三火球术
        if (id == 2)
        {
            Vector3 pos = transform.position;
            pos.y += 1f + UnityEngine.Random.Range(0f, 1f);
            if (UnityEngine.Random.Range(0, 16) > 7)
            {
                pos += transform.right * (0.5f + UnityEngine.Random.Range(0f, 1f));
            }
            else
            {
                pos -= transform.right * (0.5f + UnityEngine.Random.Range(0f, 1f));
            }

            GameObject bult = GameObject.Instantiate(MAGE_B2, pos, transform.rotation) as GameObject;
            bult.transform.SetParent(U3DAPI.FX_POOL_TF, false);

            Transform real_track = bult.transform.FindChild("t");
            if (real_track != null)
            {
                HitData hd = m_linkProfessionRole.Link_PRBullet(3005, 2f, bult, real_track);
                hd.m_Color_Main   = SkillModel.getskill_mcolor(3005);
                hd.m_Color_Rim    = SkillModel.getskill_rcolor(3005);
                hd.m_nHurtSP_type = 11;
                hd.m_nHurtSP_pow  = 1;

                hd.m_aniTrack = real_track.GetComponent <Animator>();
                real_track.gameObject.layer = EnumLayer.LM_BT_FIGHT;

                Transform real_fx = real_track.FindChild("f");
                if (real_fx != null)
                {
                    hd.m_aniFx = real_fx.GetComponent <Animator>();
                }
            }
        }

        //法师雷电术
        if (3002 == id)
        {
            cur_3002_num     = 0;
            cur_3002_forward = transform.forward;
            cur_3002_pos     = transform.position;

            CancelInvoke("skill_3002");
            InvokeRepeating("skill_3002", 0, 0.2f);

            //if (m_linkProfessionRole.m_LockRole != null)
            //{
            //    if (m_linkProfessionRole.m_LockRole.isDead)
            //    {
            //        return;
            //    }

            //    float dis = Vector3.Distance(transform.position, m_linkProfessionRole.m_LockRole.m_curModel.position);
            //    float angle = Vector3.Angle(transform.position, m_linkProfessionRole.m_LockRole.m_curModel.position);

            //    Vector3 forward = m_linkProfessionRole.m_LockRole.m_curModel.position - transform.position;
            //    Quaternion qua = Quaternion.LookRotation(forward);

            //    float rate = dis / 3.2f;

            //    GameObject s3002;
            //    if (UnityEngine.Random.Range(0f, 1f) > 0.5f)
            //        s3002 = MAGE_S3002;
            //    else
            //        s3002 = MAGE_S3002_2;
            //    HitData hd = m_linkProfessionRole.Build_PRBullet(3002, 2.0f, s3002, pos, qua);
            //    hd.m_hdRootObj.transform.localScale = new Vector3(1, 1, rate);
            //    hd.m_nDamage = 1088;
            //    hd.m_Color_Main = Color.gray;
            //    hd.m_Color_Rim = Color.white;

            //    hd.m_nHurtFX = 1;

            //    //雷电指定攻击目标必中
            //    if (m_linkProfessionRole.m_LockRole is MonsterRole)
            //        m_linkProfessionRole.m_LockRole.m_curPhy.GetComponent<MonHurtPoint>().OnTriggerEnter(hd.m_hdRootObj.GetComponent<BoxCollider>());
            //    else if (m_linkProfessionRole.m_LockRole.m_isMain)
            //        m_linkProfessionRole.m_LockRole.m_curPhy.GetComponent<SelfHurtPoint>().OnTriggerEnter(hd.m_hdRootObj.GetComponent<BoxCollider>());
            //    else
            //        m_linkProfessionRole.m_LockRole.m_curPhy.GetComponent<OtherHurtPoint>().OnTriggerEnter(hd.m_hdRootObj.GetComponent<BoxCollider>());
            //}
        }

        if (3011 == id)
        {
            if (m_linkProfessionRole == null)
            {
                return;
            }

            if (m_linkProfessionRole.m_LockRole == null || m_linkProfessionRole.m_LockRole.m_curModel == null)
            {
                return;
            }

            Vector3 ball_30111_pos_start = transform.position;
            ball_30111_pos_start.y = ball_30111_pos_start.y + m_linkProfessionRole.headOffset.y / 2;
            Vector3 ball_30111_pos   = m_linkProfessionRole.m_LockRole.m_curModel.position;
            float   ball_30111_hight = ball_30111_pos.y + m_linkProfessionRole.m_LockRole.headOffset.y / 2;
            float   ball_3011_dis    = Vector3.Distance(transform.position, m_linkProfessionRole.m_LockRole.m_curModel.position);

            m_linkProfessionRole.TurnToRole(m_linkProfessionRole.m_LockRole, false);

            for (int i = 0; i < 6; i++)
            {
                float pos_x = UnityEngine.Random.Range(-1, 1);
                float pos_y = UnityEngine.Random.Range(-0.5f, 1);
                float pos_z = UnityEngine.Random.Range(-1, 1);

                GameObject fx_inst = GameObject.Instantiate(MAGE_S3011,
                                                            new Vector3(ball_30111_pos_start.x + pos_x, ball_30111_pos_start.y + pos_y, ball_30111_pos_start.z + pos_z), transform.rotation) as GameObject;
                fx_inst.transform.SetParent(U3DAPI.FX_POOL_TF, false);
                Destroy(fx_inst, 4);

                Transform ball = fx_inst.transform;
                float     time = 0.35f + ball_3011_dis * 0.01f;
                if (time > 3)
                {
                    time = 3;
                }
                Tweener tween1 = ball.DOLocalMove(new Vector3(ball_30111_pos.x, ball_30111_hight, ball_30111_pos.z), time).SetDelay(0.1f * i);
                tween1.SetUpdate(true);
                int rang = UnityEngine.Random.Range(0, 5);
                switch (rang)
                {
                case 1:
                    tween1.SetEase(Ease.OutQuad);
                    break;

                case 2:
                    tween1.SetEase(Ease.OutCirc);
                    break;

                case 3:
                    tween1.SetEase(Ease.OutCubic);
                    break;

                case 4:
                    tween1.SetEase(Ease.OutExpo);
                    break;

                case 5:
                    tween1.SetEase(Ease.OutElastic);
                    break;
                }
                tween1.OnComplete(delegate()
                {
                    ball.gameObject.SetActive(false);
                    GameObject fx_inst_end = GameObject.Instantiate(MAGE_S3011_1) as GameObject;
                    fx_inst_end.transform.SetParent(U3DAPI.FX_POOL_TF, false);
                    fx_inst_end.transform.localPosition = ball.transform.localPosition;
                    Destroy(fx_inst_end, 2f);
                    Destroy(fx_inst, 1);

                    HitData hd = m_linkProfessionRole.Build_PRBullet(3004, 0.125f, SceneTFX.m_Bullet_Prefabs[1],
                                                                     new Vector3(ball_30111_pos.x, ball_30111_hight, ball_30111_pos.z), transform.rotation);
                    hd.m_nDamage    = 288;
                    hd.m_Color_Main = SkillModel.getskill_mcolor(3004);
                    hd.m_Color_Rim  = SkillModel.getskill_rcolor(3004);
                    //hd.m_Color_Main = Color.blue;
                    //hd.m_Color_Rim = Color.cyan;

                    //hd.m_nHurtFX = 1;

                    //hd.m_nHurtSP_type = 11;
                    //hd.m_nHurtSP_pow = 2;
                });
            }
        }

        if (m_linkProfessionRole.getShowSkillEff() == 2)
        {
            return;
        }

        //debug.Log("法师的攻击记录点 id = " + id);
        if (id == 300111 || id == 300112 || id == 300121 || id == 300122 || id == 30013)
        {
            float dis  = 1;
            int   type = 1;

            switch (id)
            {
            case 300111:
                dis  = 2;
                type = 4;
                break;

            case 300112:
                dis  = 8;
                type = 4;
                break;

            case 300121:
                dis  = 2;
                type = 5;
                break;

            case 300122:
                dis  = 8;
                type = 5;
                break;

            case 30013:
                dis  = 3;
                type = 7;
                break;
            }

            Vector3 pos = transform.position + transform.forward * dis;

            HitData hd = m_linkProfessionRole.Build_PRBullet(3001, 0.125f, SceneTFX.m_Bullet_Prefabs[type], pos, transform.rotation);
            hd.m_nDamage = 288;
            hd.m_nHurtFX = 8;
            // hd.m_Color_Main = Color.blue;
            hd.m_Color_Main = SkillModel.getskill_mcolor(3001);

            // hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(3001);
        }

        //3号打一片的技能
        if (id == 101)
        {
            Vector3 pos = transform.position;

            HitData hd = m_linkProfessionRole.Build_PRBullet(3004, 0.125f, SceneTFX.m_Bullet_Prefabs[7], pos, transform.rotation);
            hd.m_nDamage = 288;
            //hd.m_Color_Main = Color.blue;
            hd.m_Color_Main = SkillModel.getskill_mcolor(3004);
            //hd.m_Color_Rim = Color.cyan;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(3004);
            hd.m_nHurtFX   = 1;

            hd.m_nHurtSP_type = 11;
            hd.m_nHurtSP_pow  = 2;
        }

        //法师冰封
        if (3009 == id)
        {
            Vector3 pos = transform.position + transform.forward * 3.5f;

            HitData hd = m_linkProfessionRole.Build_PRBullet(3009, 0.125f, SceneTFX.m_Bullet_Prefabs[7], pos, transform.rotation);
            hd.m_nDamage = 288;
            // hd.m_Color_Main = Color.white;
            hd.m_Color_Main = SkillModel.getskill_mcolor(3009);
            //hd.m_Color_Rim = new Color(0.02f, 0.73f, 0.92f, 0.51f);
            hd.m_Color_Rim    = SkillModel.getskill_rcolor(3009);
            hd.m_nHurtSP_type = 31;
            hd.m_nHurtSP_pow  = 2;
        }

        if (30071 == id)
        {
            Vector3 pos = transform.position + transform.forward * 3.5f;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(3007, 3.5f, SceneTFX.m_Bullet_Prefabs[8], pos, transform.rotation);
            hd.m_nDamage = 0;
            //hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(3007);
            //hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim   = SkillModel.getskill_rcolor(3007);
            pos.y           += 1f;
            hd.m_nHurtSP_pos = pos;

            hd.m_nHurtSP_type = 14;
            hd.m_nHurtSP_pow  = 4;
            hd.m_hurtNum      = 0;
        }
        if (30072 == id)
        {
            cur_3007_1_time = 0;
            CancelInvoke("skill_3007_1");
            InvokeRepeating("skill_3007_1", 0, 0.4f);
        }
        if (30073 == id)
        {
            cur_3007_2_time = 0;
            CancelInvoke("skill_3007_2");
            InvokeRepeating("skill_3007_2", 0, 0.4f);
        }
    }
    //加入碰撞点
    public void onBullet(int id)
    {
        if (m_linkProfessionRole.getShowSkillEff() == 2)
        {
            return;
        }

        //刺客的三段攻击
        if (id == 1)
        {
            Vector3 pos = transform.position + transform.forward * 1.5f;
            pos.y += 1f;
            HitData hd = m_linkProfessionRole.Build_PRBullet(5001, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

            // hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(5001);
            //hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(5001);
            hd.m_nHurtFX   = 2;
        }

        if (id == 2)
        {
            Vector3 pos = transform.position + transform.forward * 1.5f;
            pos.y += 1f;

            HitData hd = m_linkProfessionRole.Build_PRBullet(5001, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);
            // hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(5001);
            //hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim    = SkillModel.getskill_rcolor(5001);
            hd.m_nHurtSP_type = 1;
            hd.m_nHurtSP_pow  = 2;

            hd.m_nHurtFX = 2;
        }

        if (id == 3)
        {
            Vector3 pos = transform.position + transform.forward * 2.5f;
            pos.y += 1f;

            HitData hd = m_linkProfessionRole.Build_PRBullet(5001, 0.125f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);
            // hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(5001);
            //hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(5001);

            hd.m_nHurtFX = 2;

            hd.m_nLastHit = 1;
        }

        //刺客的疾风连刺
        if (id == 50021)
        {
            Vector3 pos = transform.position + transform.forward * 1.5f;
            pos.y += 1f;

            HitData hd = m_linkProfessionRole.Build_PRBullet(5002, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

            hd.m_nDamage = 58;
            //hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(5002);
            //hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(5002);
            hd.m_nHurtFX   = 4;
        }

        //刺客的疾风连刺
        if (id == 50022)
        {
            Vector3 pos = transform.position + transform.forward * 1.5f;
            pos.y += 1f;

            HitData hd = m_linkProfessionRole.Build_PRBullet(5002, 0.125f, SceneTFX.m_Bullet_Prefabs[5], pos, transform.rotation);

            hd.m_nDamage = 138;
            //hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(5002);
            //hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(5002);
            hd.m_nHurtFX   = 5;

            hd.m_nHurtSP_type = 11;
            hd.m_nHurtSP_pow  = 3;

            hd.m_nLastHit = 1;
        }

        //刺客的疾风乱舞
        if (id == 5)
        {
            Vector3 pos = transform.position;
            pos.y += 1f;

            HitData hd = m_linkProfessionRole.Build_PRBullet(5003, 0.125f, SceneTFX.m_Bullet_Prefabs[5], pos, transform.rotation);

            hd.m_nDamage = 57;
            //hd.m_Color_Main = Color.blue;
            hd.m_Color_Main = SkillModel.getskill_mcolor(5003);
            // hd.m_Color_Rim = Color.cyan;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(5003);


            hd.m_nHurtFX = 5;
        }

        //(影袭)
        if (id == 50041)
        {
            Vector3 pos = transform.position + transform.forward * 1.5f;
            pos.y += 1f;
            HitData hd = m_linkProfessionRole.Build_PRBullet(5004, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

            // hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(5004);
            //hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(5004);
            hd.m_nHurtFX   = 4;
        }

        //(影袭)
        if (id == 50042)
        {
            Vector3 pos = transform.position + transform.forward * 1.5f;
            pos.y += 1f;
            HitData hd = m_linkProfessionRole.Build_PRBullet(5004, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

            // hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(5004);
            //hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(5004);
            hd.m_nLastHit  = 1;
            hd.m_nHurtFX   = 5;
        }

        //特殊处理瞬移到敌人身后(影袭)
        if (131 == id)
        {
            if (m_linkProfessionRole.m_LockRole != null)
            {
                Vector3 dis_pos = m_linkProfessionRole.m_curModel.position - m_linkProfessionRole.m_LockRole.m_curModel.position;
                if (dis_pos.magnitude < 4f)
                {
                    m_linkProfessionRole.m_curModel.position = m_linkProfessionRole.m_LockRole.m_curModel.position - m_linkProfessionRole.m_LockRole.m_curModel.forward * 4f;
                    m_linkProfessionRole.m_curModel.forward  = m_linkProfessionRole.m_LockRole.m_curModel.forward;
                }
            }

            //m_monRole.m_curModel.position = hd.m_CastRole.m_curModel.position + hd.m_CastRole.m_curModel.forward * 2f;
        }

        //幻影杀阵
        if (50071 == id)
        {
            Vector3 pos = transform.position;
            //pos.y += 1f;
            HitData hd = m_linkProfessionRole.Build_PRBullet(5007, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

            //hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(5007);
            // hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(5007);
            hd.m_nHurtFX   = 5;
        }
        if (50072 == id)
        {
            Vector3 pos = transform.position;
            //pos.y += 1f;
            HitData hd = m_linkProfessionRole.Build_PRBullet(5007, 0.125f, SceneTFX.m_Bullet_Prefabs[7], pos, transform.rotation);

            //hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(5007);
            //hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(5007);
            hd.m_nHurtFX   = 1;
        }
        if (5006 == id)
        {
            Vector3 pos = transform.position;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(5006, 1.0f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

            // hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(5006);
            //hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(5006);
            hd.m_nHurtFX   = 2;
        }
        if (5009 == id)
        {
            if (m_linkProfessionRole.m_LockRole != null)
            {//闪现过去后朝向目标
                m_linkProfessionRole.TurnToRole(m_linkProfessionRole.m_LockRole, true);
            }

            Vector3 pos = transform.position;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(5009, 0.125f, SceneTFX.m_Bullet_Prefabs[7], pos, transform.rotation);

            // hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(5009);
            //hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(5009);
            hd.m_nHurtFX   = 2;
        }
    }
Esempio n. 8
0
    public void onBullet(int id)
    {
        if (m_linkProfessionRole.getShowSkillEff() == 2)
        {
            return;
        }

        //战士普通三段攻击
        if (id == 1)
        {
            Vector3 pos = transform.position + transform.forward * 1.5f;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2001, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

            hd.m_nDamage = 108;
            // hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2001);
            //hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(2001);
            hd.m_nHurtFX   = 2;
        }

        if (id == 2)
        {
            Vector3 pos = transform.position + transform.forward * 1.5f;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2001, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);
            hd.m_nDamage = 128;
            // hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2001);
            // hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(2001);
            hd.m_nHurtFX   = 2;
        }

        if (id == 3)
        {
            Vector3 pos = transform.position + transform.forward * 2.5f;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2001, 0.125f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);
            hd.m_nDamage = 188;
            //hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2001);
            // hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(2001);
            //hd.m_nHurtSP_type = 1;
            //hd.m_nHurtSP_pow = 3;

            hd.m_nHurtFX = 2;

            hd.m_nHurtSP_type = 11;
            hd.m_nHurtSP_pow  = 3;

            hd.m_nLastHit = 1;
        }

        //战士的旋风斩(飓风)
        if (id == 4)
        {
            Vector3 pos = transform.position;// +transform.forward * 1.5f;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2003, 0.125f, SceneTFX.m_Bullet_Prefabs[5], pos, transform.rotation);
            hd.m_nDamage = 88;
            //hd.m_Color_Main = Color.red;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2003);
            // hd.m_Color_Rim = Color.red;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(2003);
            hd.m_nHurtFX   = 3;
        }

        //战士的纵砍(力劈)
        if (id == 21)
        {
            Vector3 pos = transform.position + transform.forward * 4f;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2004, 0.2f, SceneTFX.m_Bullet_Prefabs[6], pos, transform.rotation);
            hd.m_nDamage = 388;
            // hd.m_Color_Main = Color.red;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2004);
            //  hd.m_Color_Rim = Color.red;
            hd.m_Color_Rim    = SkillModel.getskill_rcolor(2004);
            hd.m_nHurtSP_type = 1;
            hd.m_nHurtSP_pow  = 4;
        }


        //加入战士的丢斧头的技能(这是跟踪弹类的技能)
        if (13 == id)
        {
            if (m_linkProfessionRole.m_LockRole != null)
            {
                Vector3 pos = transform.position + transform.forward * 0.5f;
                pos.y += 1.25f;

                HitData hd = m_linkProfessionRole.Build_PRBullet(2004, 0f, WARRIOR_B1, pos, transform.rotation);

                FollowBullet_Mgr.AddBullet(m_linkProfessionRole.m_LockRole, hd, 0.8f);
            }
        }

        //战士的回锋技能,会将怪拉来
        if (141 == id)
        {
            Vector3 pos = transform.position + transform.forward * 3.0f;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2002, 0.3f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);

            hd.m_nDamage = 108;
            // hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2002);
            //hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(2002);
            hd.m_nHurtFX   = 2;
        }

        if (142 == id)
        {
            Vector3 pos = transform.position + transform.forward * 6.0f;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2002, 0.3f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);

            hd.m_nDamage = 88;
            //  hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2002);
            //hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(2002);
            hd.m_nHurtFX   = 2;
        }

        if (143 == id)
        {
            Vector3 pos = transform.position + transform.forward * 4.0f;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2002, 0.2f, SceneTFX.m_Bullet_Prefabs[6], pos, transform.rotation);

            hd.m_nDamage = 188;
            //hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2002);
            //hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(2002);
            hd.m_nHurtFX   = 2;

            //有拉到Cast面前的效果
            hd.m_nHurtSP_type = 21;
            hd.m_nHurtSP_pow  = 4;
        }
        if (2009 == id)
        {
            Vector3 pos = transform.position + transform.forward * 3f;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2009, 0.2f, SceneTFX.m_Bullet_Prefabs[5], pos, transform.rotation);
            hd.m_nDamage = 88;
            //hd.m_Color_Main = Color.red;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2009);
            // hd.m_Color_Rim = Color.red;
            hd.m_Color_Rim    = SkillModel.getskill_rcolor(2009);
            hd.m_nHurtSP_type = 11;
            hd.m_nHurtSP_pow  = 4;

            hd.m_nHurtFX = 6;
        }
        if (2006 == id)
        {
            Vector3 pos = transform.position /* + transform.forward * 3f*/;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2006, 0.2f, SceneTFX.m_Bullet_Prefabs[6], pos, transform.rotation);
            hd.m_nDamage = 88;
            // hd.m_Color_Main = Color.red;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2006);
            //hd.m_Color_Rim = Color.red;
            hd.m_Color_Rim    = SkillModel.getskill_rcolor(2006);
            hd.m_nHurtSP_type = 11;
            hd.m_nHurtSP_pow  = 4;

            hd.m_nHurtFX = 6;
        }
        if (2007 == id)
        {
            Vector3 pos = transform.position + transform.forward * 1f;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2007, 0.3f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);
            hd.m_nDamage = 88;
            // hd.m_Color_Main = Color.red;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2007);
            //hd.m_Color_Rim = Color.red;
            hd.m_Color_Rim    = SkillModel.getskill_rcolor(2007);
            hd.m_nHurtSP_type = 11;
            hd.m_nHurtSP_pow  = 10;

            hd.m_nHurtFX = 3;
        }
    }