Exemplo n.º 1
0
 /// <summary>
 /// 死亡
 /// </summary>
 public virtual void OnDead(DeadCommand ev)
 {
     StopPathFinding();
     this.m_AnimController.Play("die");
     Attrbute.UpdateValue(ActorAttributeType.Hp, 0);
     Attrbute.UpdateValue(ActorAttributeType.Mp, 0);
     this.Clear();
     this.ApplyCharacterCtrl(false);
     this.m_ActorAI.Clear();
     //DBEntiny db = ZTConfig.Instance.GetDBEntiny(Id);
     //if ((this is ActorMainPlayer) == false)
     //{
     //    LevelData.AllActors.Remove(this);
     //}
     //switch (ActorType)
     //{
     //    case EActorType.PLAYER:
     //        if (this is ActorMainPlayer)
     //        {
     //            ZTLevel.Instance.OnMainPlayerDead();
     //        }
     //        break;
     //    case EActorType.MONSTER:
     //        ZTEvent.FireEvent(EventID.RECV_KILL_MONSTER, GUID, Id);
     //        ZTTimer.Instance.Register(1.5f, OnDeadEnd);
     //        break;
     //}
 }
Exemplo n.º 2
0
        public override void OnDead(DeadCommand ev)
        {
            base.OnDead(ev);

            KillMonsterEventArgs args = ReferencePool.Acquire <KillMonsterEventArgs>().Fill(Id, EntityId);

            GameEntry.Event.Fire(this, args);
        }
Exemplo n.º 3
0
        //死亡
        protected virtual CommandReplyType CheckDead(DeadCommand cmd)
        {
            m_ActorSkill.Clear();
            if (GetActorState(ActorStateType.IsRide))
            {
                OnEndRide();
            }

            ChangeState <ActorDeadFsm>(cmd);
            return(CommandReplyType.YES);
        }
Exemplo n.º 4
0
        public override void OnDead(DeadCommand ev)
        {
            base.OnDead(ev);

            GameEntry.Camera.ShowEffect(CameraEffectType.ScreenGray);
            GameEntry.Timer.Register(4, () =>
            {
                OnPlayerDeadEventArgs args = ReferencePool.Acquire <OnPlayerDeadEventArgs>().Fill(ev.Type);
                GameEntry.Event.Fire(this, args);
            });

            HidePartner();
        }
Exemplo n.º 5
0
        /// <summary>
        /// 死亡
        /// </summary>
        public virtual void OnDead(DeadCommand ev)
        {
            StopPathFinding();
            this.m_AnimController.Play("die");
            Attrbute.UpdateValue(AttributeType.Hp, 0);
            Attrbute.UpdateValue(AttributeType.Mp, 0);
            this.ApplyCharacterCtrl(false);

            //播放死亡动画后删除
            GameEntry.Timer.Register(3f, () =>
            {
                GameEntry.Level.DelRole(this.Camp, this.EntityId);
            });
        }