Exemple #1
0
    private void ShowSplitEffect(SMsgActionDie_SC sMsgActionDie_SC)
    {
        var cutUpEffect = Instantiate(BattleConfigManager.Instance.CutUpEffect) as GameObject;

        cutUpEffect.transform.position = this.ThisTransform.position;
        cutUpEffect.AddComponent <SplitEffect>().SetSplitData(sMsgActionDie_SC);
    }
Exemple #2
0
        void ReceiveEntityDieHandle(INotifyArgs args)
        {
            SMsgActionDie_SC sMsgActionDie_SC = (SMsgActionDie_SC)args;

            //TraceUtil.Log("收到死亡消息:"+sMsgActionDie_SC.uidEntity+"玩家ID:"+PlayerManager.Instance.FindHeroDataModel().SMsg_Header.uidEntity);
            if (sMsgActionDie_SC.uidEntity == PlayerManager.Instance.FindHeroDataModel().SMsg_Header.uidEntity)
            {
                SetHeroDeathStatus();
            }
        }
Exemple #3
0
    public void SetSplitData(SMsgActionDie_SC data)
    {
        EntityModel mudModel = PlayerManager.Instance.GetEntityMode(data.uidMuderer);

        if (mudModel == null)
        {
            TraceUtil.Log(SystemModel.Common, TraceLevel.Error, "未找到谋杀者!!!!  uid: " + data.uidMuderer);
        }
        else
        {
            m_mudTrans = mudModel.GO.transform;
            this.m_SMsgActionDie_SC = data;
        }
    }
Exemple #4
0
        /// <summary>
        /// 角色死亡消息
        /// </summary>
        /// <param name="inotifyArgs"></param>
        void ReceiveEntityDieHandle(INotifyArgs inotifyArgs)
        {
            //TraceUtil.Log("收到角色死亡消息:" + BattleSceneTrialsEctypeUIManager.Instance.ISTrialsEctype);
            if (PVPBattleManager.Instance.IsPVPBattle || BattleSceneTrialsEctypeUIManager.Instance.ISTrialsEctype)
            {
                return;
            }
            SMsgActionDie_SC sMsgActionDie_SC = (SMsgActionDie_SC)inotifyArgs;

            if (sMsgActionDie_SC.uidEntity == PlayerManager.Instance.FindHeroDataModel().SMsg_Header.uidEntity)
            {
                //Debug.LogWarning("收到死亡消息:" + sMsgActionDie_SC.uidEntity + "玩家ID:" + PlayerManager.Instance.FindHeroDataModel().SMsg_Header.uidEntity);
                ShowDeathBtn();
            }
        }
Exemple #5
0
    void EntityDieHandle(INotifyArgs e)
    {
        SMsgActionDie_SC sMsgActionDie_SC = (SMsgActionDie_SC)e;

        this.DestroyAllBullets(sMsgActionDie_SC.uidEntity);
    }
Exemple #6
0
    //死亡
    public void Die(SMsgActionDie_SC sMsgActionDie_SC)
    {
        this.m_isDie = true;

        //是否施放死亡子弹
        if (m_MonsterConfigData._DeathBullet.Length > 0)
        {
            for (int i = 0; i < m_MonsterConfigData._DeathBullet.Length; i++)
            {
                int bulletID = m_MonsterConfigData._DeathBullet[i];
                BulletFactory.Instance.CreateBullet(bulletID, RoleDataModel.SMsg_Header.uidEntity, ThisTransform, 0, 0);
                //BulletFactory.Instance.bullet
                //BulletData bulletData = SkillDataManager.Instance.GetBulletData(bulletID);
            }
        }

        //怪物死亡特效
        bool isDeadEffect = m_MonsterConfigData._deadEffect != "0";

        if (isDeadEffect)
        {
            GameObject deadEffectPrefab = MapResManager.Instance.GetMapEffectPrefab(m_MonsterConfigData._deadEffect);
            if (deadEffectPrefab != null)
            {
                GameObject deadEffect = (GameObject)Instantiate(deadEffectPrefab);
                deadEffect.transform.position = ThisTransform.position;
                deadEffect.AddComponent <DestroySelf>();
            }
            //normal
            this.NormalStatus.SetActive(false);
            m_FSMSystem.FindState(StateID.MonsterDie).m_roleAnimationComponent = this.NormalStatus.animation;
            SplitToDie = false;
        }
        else
        {
            if (this.SplitStatus != null)
            {
                switch (sMsgActionDie_SC.byDieType)
                {
                case 0:                   //Normal
                    this.NormalStatus.SetActive(true);
                    this.SplitStatus.SetActive(false);
                    m_FSMSystem.FindState(StateID.MonsterDie).m_roleAnimationComponent = this.NormalStatus.animation;
                    SplitToDie = false;
                    break;

                case 1:                   //Split
                    this.NormalStatus.SetActive(false);
                    this.SplitStatus.SetActive(true);
                    m_FSMSystem.FindState(StateID.MonsterDie).m_roleAnimationComponent = this.SplitStatus.animation;
                    this.ShowHurtFlash(false, this.m_hurtDuration);
                    SplitToDie = true;
                    ShowBloodEffect();
                    break;
                }
            }
        }


        if (sMsgActionDie_SC.byDieType == 1)
        {
            if (sMsgActionDie_SC.byTrigger == 1)
            {
                ShowSplitEffect(sMsgActionDie_SC);
            }
        }


        m_FSMSystem.PerformTransition(Transition.MonsterToDie);

        //if (this.m_MonsterConfigData.MonsterSubType == 2)
        //{
        //    PopupObjManager.Instance.ShowBattleResult(true);
        //}
    }