Ejemplo n.º 1
0
    private void onSFX(int id)
    {
        bool flag = this.m_linkProfessionRole.getShowSkillEff() == 3;

        if (!flag)
        {
            bool flag2 = id == 2003;
            if (flag2)
            {
                bool flag3 = base.transform.FindChild(this.fx_2003_name) != null;
                if (!flag3)
                {
                    base.CancelInvoke("SFX_2003_hide");
                    base.Invoke("SFX_2003_hide", 3.5f);
                    GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(P2Warrior.WARRIOR_SFX1);
                    UnityEngine.Object.Destroy(gameObject, 5f);
                    this.fx_2003_name = gameObject.name;
                    gameObject.transform.SetParent(base.transform, false);
                }
            }
            else
            {
                this.SFX_2003_hide();
                SceneFXMgr.Instantiate("FX/warrior/SFX_" + id.ToString(), base.transform.position, base.transform.rotation, 4f);
            }
        }
    }
    //自身特效
    private void onSFX(int id)
    {
        if (m_linkProfessionRole.getShowSkillEff() == 2)
        {
            return;
        }

        if (id == 5003)
        {//刺客5003技能特效特殊处理。
            if (transform.FindChild(fx_5003_name) != null)
            {
                return;
            }

            CancelInvoke("SFX_5003_hide");
            Invoke("SFX_5003_hide", 2.5f);

            GameObject fx_inst = GameObject.Instantiate(P5Assassin.ASSASSIN_SFX1) as GameObject;
            GameObject.Destroy(fx_inst, 4f);
            fx_5003_name = fx_inst.name;
            fx_inst.transform.SetParent(transform, false);

            return;
        }
        else
        {
            SFX_5003_hide();
        }

        SceneFXMgr.Instantiate("FX_assa_SFX_" + id.ToString(), transform.position, transform.rotation, 4f);
    }
Ejemplo n.º 3
0
    private void onSFX(int id)
    {
        bool flag = this.m_monRole is M000P2 || this.m_monRole is ohterP2Warrior;

        if (flag)
        {
            bool flag2 = id == 2003;
            if (flag2)
            {
                bool flag3 = base.transform.FindChild(this.fx_2003_name) != null;
                if (!flag3)
                {
                    base.CancelInvoke("SFX_2003_hide");
                    base.Invoke("SFX_2003_hide", 3.5f);
                    GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(P2Warrior.WARRIOR_SFX1);
                    UnityEngine.Object.Destroy(gameObject, 5f);
                    this.fx_2003_name = gameObject.name;
                    gameObject.transform.SetParent(base.transform, false);
                }
            }
            else
            {
                SceneFXMgr.Instantiate("FX/warrior/SFX_" + id.ToString(), base.transform.position, base.transform.rotation, 4f);
            }
        }
        else
        {
            bool flag4 = this.m_monRole is M000P3 || this.m_monRole is ohterP3Mage;
            if (flag4)
            {
                SceneFXMgr.Instantiate("FX/mage/SFX_" + id.ToString(), base.transform.position, base.transform.rotation, 6f);
            }
            else
            {
                bool flag5 = this.m_monRole is M000P5 || this.m_monRole is ohterP5Assassin;
                if (flag5)
                {
                    bool flag6 = id == 5003;
                    if (flag6)
                    {
                        bool flag7 = base.transform.FindChild(this.fx_5003_name) != null;
                        if (!flag7)
                        {
                            base.CancelInvoke("SFX_5003_hide");
                            base.Invoke("SFX_5003_hide", 2.5f);
                            GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(P5Assassin.ASSASSIN_SFX1);
                            UnityEngine.Object.Destroy(gameObject2, 4f);
                            this.fx_5003_name = gameObject2.name;
                            gameObject2.transform.SetParent(base.transform, false);
                        }
                    }
                    else
                    {
                        SceneFXMgr.Instantiate("FX/assa/SFX_" + id.ToString(), base.transform.position, base.transform.rotation, 4f);
                    }
                }
            }
        }
    }
Ejemplo n.º 4
0
    //自身特效
    private void onSFX(int id)
    {
        if (m_linkProfessionRole.getShowSkillEff() == 2)
        {
            return;
        }

        SceneFXMgr.Instantiate("FX_mage_SFX_" + id.ToString(), transform.position, transform.rotation, 6f);
    }
Ejemplo n.º 5
0
    private void onSFX(int id)
    {
        bool flag = this.m_linkProfessionRole.getShowSkillEff() == 3;

        if (!flag)
        {
            SceneFXMgr.Instantiate("FX/mage/SFX_" + id.ToString(), base.transform.position, base.transform.rotation, 6f);
        }
    }
Ejemplo n.º 6
0
    private void onSFX(string id)
    {
        if (SceneCamera.m_nSkillEff_Level > 1 && m_monRole.masterid != PlayerModel.getInstance().cid)
        {
            return;
        }

        SceneFXMgr.Instantiate("FX_zhsFX_slef_FX_" + id, transform.position, transform.rotation, 1.5f);
    }
    private void onSFX(int id)
    {
        if (m_monRole is M000P2 || m_monRole is ohterP2Warrior)
        {
            if (id == 2003)
            {
                if (transform.FindChild(fx_2003_name) != null)
                {
                    return;
                }
                CancelInvoke("SFX_2003_hide");
                Invoke("SFX_2003_hide", 3.5f);
                GameObject fx_inst = GameObject.Instantiate(P2Warrior.WARRIOR_SFX1) as GameObject;
                GameObject.Destroy(fx_inst, 5f);
                fx_2003_name = fx_inst.name;
                fx_inst.transform.SetParent(transform, false);
                return;
            }
            SceneFXMgr.Instantiate("FX_warrior_SFX_" + id.ToString(), transform.position, transform.rotation, 4f);
        }
        else if (m_monRole is M000P3 || m_monRole is ohterP3Mage)
        {
            SceneFXMgr.Instantiate("FX_mage_SFX_" + id.ToString(), transform.position, transform.rotation, 6f);
        }
        else if (m_monRole is M000P5 || m_monRole is ohterP5Assassin)
        {
            if (id == 5003)
            {//刺客5003技能特效特殊处理。
                if (transform.FindChild(fx_5003_name) != null)
                {
                    return;
                }

                CancelInvoke("SFX_5003_hide");
                Invoke("SFX_5003_hide", 2.5f);

                GameObject fx_inst = GameObject.Instantiate(P5Assassin.ASSASSIN_SFX1) as GameObject;
                GameObject.Destroy(fx_inst, 4f);
                fx_5003_name = fx_inst.name;
                fx_inst.transform.SetParent(transform, false);

                return;
            }
            SceneFXMgr.Instantiate("FX_assa_SFX_" + id.ToString(), transform.position, transform.rotation, 4f);
        }
    }
Ejemplo n.º 8
0
 private void onSFX(int id)
 {
     SceneFXMgr.Instantiate("FX/monsterSFX/10001/SFX_" + id.ToString(), base.transform.position, base.transform.rotation, 2f);
 }
Ejemplo n.º 9
0
    public void onSFX_EFF(string id)
    {
        bool flag = !MonsterMgr._inst.dMonEff.ContainsKey(id);

        if (!flag)
        {
            MonEffData monEffData = MonsterMgr._inst.dMonEff[id];
            Quaternion rotation   = base.transform.rotation;
            Quaternion rotation2  = Quaternion.Euler(0f, monEffData.rotation, 0f);
            Vector3    position   = base.transform.position + rotation2 * base.transform.forward * monEffData.f;
            position.y += monEffData.y;
            bool romote = monEffData.romote;
            if (romote)
            {
                bool flag2 = this.m_monRole.m_LockRole != null && this.m_monRole.m_LockRole.m_curModel != null;
                if (flag2)
                {
                    this.m_monRole.TurnToRole(this.m_monRole.m_LockRole, false);
                    GameObject original = Resources.Load <GameObject>(monEffData.file);
                    GameObject bult     = UnityEngine.Object.Instantiate(original, position, rotation) as GameObject;
                    bult.transform.SetParent(U3DAPI.FX_POOL_TF, false);
                    Transform real_track = bult.transform.FindChild("t");
                    bool      flag3      = real_track != null;
                    if (flag3)
                    {
                        bool flag4 = real_track.GetComponent <Animator>() != null;
                        if (flag4)
                        {
                            real_track.GetComponent <Animator>().enabled = false;
                        }
                        real_track.gameObject.layer = EnumLayer.LM_BT_FIGHT;
                        float   num       = Vector3.Distance(base.transform.position, this.m_monRole.m_LockRole.m_curModel.position);
                        Vector3 position2 = this.m_monRole.m_LockRole.m_curModel.position;
                        position2.y += this.m_monRole.m_LockRole.headOffset.y * 3f / 4f;
                        Tweener t = bult.transform.DOLocalMove(position2, num * 0.03f / monEffData.speed, false);
                        t.SetUpdate(true);
                        switch (UnityEngine.Random.Range(0, 4))
                        {
                        case 1:
                            t.SetEase(Ease.InQuad);
                            break;

                        case 2:
                            t.SetEase(Ease.InCirc);
                            break;

                        case 3:
                            t.SetEase(Ease.InCubic);
                            break;

                        case 4:
                            t.SetEase(Ease.InExpo);
                            break;
                        }
                        t.OnComplete(delegate
                        {
                            bool flag6 = bult.transform != null && bult.transform.FindChild("t") != null;
                            if (flag6)
                            {
                                Transform transform = real_track.FindChild("f");
                                bool flag7          = transform != null;
                                if (flag7)
                                {
                                    transform.GetComponent <Animator>().SetTrigger(EnumAni.ANI_T_FXDEAD);
                                }
                                UnityEngine.Object.Destroy(bult, 2f);
                            }
                        });
                    }
                }
            }
            else
            {
                bool lockpos = monEffData.Lockpos;
                if (lockpos)
                {
                    SceneFXMgr.Instantiate(monEffData.file, this.m_monRole.m_LockRole.m_curModel.position, rotation, 4f);
                }
                else
                {
                    SceneFXMgr.Instantiate(monEffData.file, position, rotation, 4f);
                }
            }
            bool flag5 = monEffData.sound != "null";
            if (flag5)
            {
                MediaClient.instance.PlaySoundUrl("audio/eff/" + monEffData.sound, false, null);
            }
        }
    }
Ejemplo n.º 10
0
 private void onSFX(string id)
 {
     SceneFXMgr.Instantiate("FX/zhsFX/slef_FX/" + id, base.transform.position, base.transform.rotation, 1.5f);
 }
Ejemplo n.º 11
0
    public void onSFX_EFF(string id)
    {
        if (!MonsterMgr._inst.dMonEff.ContainsKey(id))
        {
            return;
        }
        MonEffData one = MonsterMgr._inst.dMonEff[id];

        Quaternion rotation = transform.rotation;

        Quaternion add_rotation = Quaternion.Euler(0, one.rotation, 0);

        Vector3 pos = transform.position + add_rotation * transform.forward * one.f;

        pos.y += one.y;

        if (one.romote)
        {//子弹类型
         //技能eff展示子弹类型 (定点,必中)
            if (m_monRole.m_LockRole != null && m_monRole.m_LockRole.m_curModel != null)
            {
                m_monRole.TurnToRole(m_monRole.m_LockRole, false);
                GameObject bult_go = GAMEAPI.ABFight_LoadPrefab(one.file);

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

                Transform real_track = bult.transform.FindChild("t");
                if (real_track != null)
                {
                    if (real_track.GetComponent <Animator>() != null)
                    {
                        real_track.GetComponent <Animator>().enabled = false;
                    }
                    real_track.gameObject.layer = EnumLayer.LM_BT_FIGHT;

                    float   dis     = Vector3.Distance(transform.position, m_monRole.m_LockRole.m_curModel.position);
                    Vector3 end_pos = m_monRole.m_LockRole.m_curModel.position;
                    end_pos.y += m_monRole.m_LockRole.headOffset.y * 3 / 4;

                    Tweener tween1 = bult.transform.DOLocalMove(end_pos, dis * 0.03f / one.speed);
                    tween1.SetUpdate(true);
                    int rang = UnityEngine.Random.Range(0, 4);
                    switch (rang)
                    {
                    case 1:
                        tween1.SetEase(Ease.InQuad);
                        break;

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

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

                    case 4:
                        tween1.SetEase(Ease.InExpo);
                        break;
                    }
                    tween1.OnComplete(delegate()
                    {
                        if (bult.transform != null && bult.transform.FindChild("t") != null)
                        {
                            Transform real_fx = real_track.FindChild("f");
                            if (real_fx != null)
                            {
                                real_fx.GetComponent <Animator>().SetTrigger(EnumAni.ANI_T_FXDEAD);
                            }
                            GameObject.Destroy(bult, 2f);
                        }
                    });
                }
            }
        }
        else if (one.Lockpos)
        {//目标位置特效
            if (m_monRole.ismapfx && m_monRole.fxvec != Vector3.zero)
            {
                GameObject pre  = GAMEAPI.ABFight_LoadPrefab(one.file);
                GameObject bult = GameObject.Instantiate(pre, m_monRole.fxvec, rotation) as GameObject;
                bult.transform.SetParent(U3DAPI.FX_POOL_TF, false);
                int     ss     = 0;
                Tweener tween1 = DOTween.To(() => ss, (float s) => {
                }, (float)0, 10f);
                tween1.OnComplete(delegate() {
                    if (bult.GetComponent <Animator>() != null)
                    {
                        bult.GetComponent <Animator>().enabled = false;
                        //bult.transform.FindChild("loop").gameObject.SetActive(false);
                        //bult.transform.FindChild("end").gameObject.SetActive(true);
                    }
                    GameObject.Destroy(bult, 4f);
                });
                // SceneFXMgr.Instantiate(one.file, m_monRole.fxvec, rotation, 4f);
                m_monRole.ismapfx = false;
            }
            else
            {
                SceneFXMgr.Instantiate(one.file, m_monRole.m_LockRole.m_curModel.position, rotation, 4f);
            }
        }
        else
        {
            SceneFXMgr.Instantiate(one.file, pos, rotation, 4f);
        }

        if (one.sound != "null")
        {
            MediaClient.instance.PlaySoundUrl("audio_eff_" + one.sound, false, null);
        }
    }
Ejemplo n.º 12
0
 //加入特效
 private void onFX(int id)
 {
     SceneFXMgr.Instantiate("FX_FX_" + id.ToString(), transform.position, transform.rotation, 2f);
 }
Ejemplo n.º 13
0
 //自身特效
 private void onSFX(int id)
 {
     SceneFXMgr.Instantiate("FX_monsterSFX_10001_SFX_" + id.ToString(), transform.position, transform.rotation, 2f);
 }