Пример #1
0
        protected void GeneralStopImpact(ImpactLogicInfo logicInfo)
        {
            if (IsLogicDead(logicInfo.Target))
            {
                SetGfxStateFlag(logicInfo.Target, Operate_Type.OT_RemoveBit, GfxCharacterState_Type.Stiffness);
                SetGfxStateFlag(logicInfo.Target, Operate_Type.OT_RemoveBit, GfxCharacterState_Type.HitFly);
                SetGfxStateFlag(logicInfo.Target, Operate_Type.OT_RemoveBit, GfxCharacterState_Type.GetUp);
            }
            else
            {
                ClearGfxStateFlag(logicInfo.Target);
            }
            logicInfo.CustomDatas.Clear();
            //foreach=>for
            for (int i = 0; i < logicInfo.EffectsDelWithImpact.Count; ++i)
            {
                GameObject Obj = logicInfo.EffectsDelWithImpact[i];
                ResourceSystem.RecycleObject(Obj);
            }

            //foreach(GameObject obj in logicInfo.EffectsDelWithImpact){
            //  ResourceSystem.RecycleObject(obj);
            //}
            ResetLayer(logicInfo.Target, logicInfo);
            LogicSystem.NotifyGfxAnimationFinish(logicInfo.Target, false);
            LogicSystem.NotifyGfxMoveControlFinish(logicInfo.Target, logicInfo.ImpactId, false);
            LogicSystem.NotifyGfxStopImpact(logicInfo.Sender, logicInfo.ImpactId, logicInfo.Target);
        }
    private void StopImpact()
    {
        m_IsStartImpact = false;

        m_AttractImpactElapsed        = 0;
        m_ImpactProcessElapsed        = 0;
        m_ImpactElapsed               = 0;
        m_AttractImpactProcessElapsed = 0;

        m_IsImpacting        = false;
        m_IsAttractImpacting = false;

        Vector3 contactPointNormal = m_BulletInfo.MoveDir * (-1);

        m_BulletInfo.BulletEndEffectInfo.EffectPos += m_HitPos;
        m_BulletInfo.BulletEndEffectInfo.EffectRot += Quaternion.identity.eulerAngles;
        TriggerImpl.PlayEffect(m_BulletInfo.BulletEndEffectInfo);

        foreach (GameObject target in m_TargetAttractInfos)
        {
            if (target != null)
            {
                LogicSystem.NotifyGfxMoveControlFinish(target);
            }
        }
        ProcessSkillImpact(m_BulletInfo.Attacker, m_TargetEndImpactInfos, m_HitPos, m_BulletInfo.ImpactEndInfos);
        ProcessSkillImpactFromSender(m_BulletInfo.Attacker, m_BulletInfo.Attacker,
                                     m_TargetEndFromRoleImpactInfos, m_BulletInfo.ImpactEndFromRoleInfos);

        GameObject.DestroyObject(this.gameObject);
    }
Пример #3
0
    public virtual void ForceStopSkill()
    {
        MoveTarget = null;
        m_SkillManager.ResetWeapons();
        m_Status = MyCharacterStatus.kIdle;
        AnimationClip anim = GetCurAnimationClip();

        if (anim != null)
        {
            m_ObjAnimation[anim.name].speed = 0;
        }
        if (m_SkillMovement != null)
        {
            m_SkillMovement.StopMove();
        }
        if (m_IsSkillActive && !CanStopBackSwing())
        {
            StopSkillEffects();
            if (m_ColliderManager != null)
            {
                m_ColliderManager.StopSkillColliders(SkillId);
            }
        }
        m_IsSkillActive = false;
        LogicSystem.NotifyGfxAnimationFinish(gameObject);
        if (m_IsControlMove)
        {
            LogicSystem.NotifyGfxMoveControlFinish(gameObject);
        }
        m_SkillPlayingEffect.Clear();
    }
Пример #4
0
 private void EndControlGravity()
 {
     m_Vertical = Vector3.zero;
     if (m_IsGravityControl)
     {
         if (GravityDropDownAnimInfo != null)
         {
             TriggerImpl.StopAnim(this.gameObject, GravityDropDownAnimInfo);
         }
         LogicSystem.NotifyGfxAnimationFinish(this.gameObject);
         LogicSystem.NotifyGfxMoveControlFinish(this.gameObject);
         m_IsGravityControl = false;
     }
 }
Пример #5
0
 public override void StopImpact(ImpactLogicInfo logicInfo)
 {
     logicInfo.IsActive = false;
     StopAnimation(logicInfo.Target, Animation_Type.AT_Grab);
     if (null != logicInfo.Target)
     {
         UnityEngine.Vector3 rotation = logicInfo.Target.transform.rotation.eulerAngles;
         logicInfo.Target.transform.rotation = UnityEngine.Quaternion.Euler(0, rotation.y, 0);
     }
     SetGfxStateFlag(logicInfo.Target, Operate_Type.OT_RemoveBit, GfxCharacterState_Type.Grab);
     LogicSystem.NotifyGfxMoveControlFinish(logicInfo.Target, logicInfo.ImpactId, false);
     LogicSystem.NotifyGfxAnimationFinish(logicInfo.Target, false);
     LogicSystem.NotifyGfxStopImpact(logicInfo.Sender, logicInfo.ImpactId, logicInfo.Target);
 }
Пример #6
0
 public virtual void OnInterrupted(ImpactLogicInfo logicInfo)
 {
     if (IsLogicDead(logicInfo.Target))
     {
         SetGfxStateFlag(logicInfo.Target, Operate_Type.OT_RemoveBit, GfxCharacterState_Type.Stiffness);
         SetGfxStateFlag(logicInfo.Target, Operate_Type.OT_RemoveBit, GfxCharacterState_Type.HitFly);
     }
     else
     {
         ClearGfxStateFlag(logicInfo.Target);
     }
     ResetLayer(logicInfo.Target, logicInfo);
     LogicSystem.NotifyGfxAnimationFinish(logicInfo.Target, false);
     LogicSystem.NotifyGfxMoveControlFinish(logicInfo.Target, logicInfo.ImpactId, false);
 }
Пример #7
0
    protected void GeneralStopSkill()
    {
        m_IsActive = false;
        m_AnimationPlayer.StopAllAnim();
        SharedGameObjectInfo info = LogicSystem.GetSharedGameObjectInfo(gameObject);

        foreach (GameObject obj in m_EffectList)
        {
            ResourceSystem.RecycleObject(obj);
        }
        m_EffectList.Clear();
        if (null != info)
        {
            LogicSystem.PublishLogicEvent("ge_set_ai_enable", "ai", info.m_LogicObjectId, true);
        }
        LogicSystem.NotifyGfxMoveControlFinish(gameObject);
        LogicSystem.NotifyGfxAnimationFinish(gameObject);
    }
Пример #8
0
        public override bool Execute(object sender, SkillInstance instance, long delta, long curSectionTime)
        {
            UnityEngine.GameObject obj = sender as UnityEngine.GameObject;
            if (null != obj)
            {
                if (m_IsControlMove)
                {
                    LogicSystem.NotifyGfxMoveControlStart(obj, instance.SkillId, true);
                }
                else
                {
                    LogicSystem.NotifyGfxMoveControlFinish(obj, instance.SkillId, true);
                }
                instance.IsControlMove = m_IsControlMove;

                //LogSystem.Debug("movecontrol:{0}", m_IsControlMove);
            }
            return(false);
        }
Пример #9
0
        //在技能未开始时取消技能(用于上层逻辑检查失败时)
        public void CancelSkill(int actorId, int skillId)
        {
            GameObject obj = LogicSystem.GetGameObject(actorId);

            if (null != obj)
            {
                SkillLogicInfo logicInfo = m_SkillLogicInfos.Find(info => info.Sender == obj && info.SkillId == skillId);
                if (null != logicInfo)
                {
                    if (logicInfo.SkillInst.IsControlMove)
                    {
                        LogicSystem.NotifyGfxMoveControlFinish(obj, skillId, true);
                        logicInfo.SkillInst.IsControlMove = false;
                    }
                    LogicSystem.NotifyGfxAnimationFinish(obj, true);
                    RecycleSkillInstance(logicInfo.Info);
                    m_SkillLogicInfos.Remove(logicInfo);
                }
            }
        }
Пример #10
0
    protected void GeneralStopImpact()
    {
        m_StartTime  = 0.0f;
        m_IsActive   = false;
        m_ImpactInfo = null;

        if (m_IsHitHighLight)
        {
            m_IsHitHighLight    = false;
            m_Renderer.material = m_NormalMaterial;
        }

        SharedGameObjectInfo info = LogicSystem.GetSharedGameObjectInfo(gameObject);

        if (null != info)
        {
            LogicSystem.PublishLogicEvent("ge_set_ai_enable", "ai", info.m_LogicObjectId, true);
        }
        LogicSystem.NotifyGfxMoveControlFinish(gameObject);
        LogicSystem.NotifyGfxAnimationFinish(gameObject);
    }
Пример #11
0
        public override void Reset()
        {
            SendFinalImpact();
            for (int i = 0; i < m_AttachedObjects.Count; i++)
            {
                LogicSystem.NotifyGfxMoveControlFinish(m_AttachedObjects[i].TargetObj, m_OwnSkill.SkillId, true);
            }

            /*
             * foreach (AttachTargetInfo ati in m_AttachedObjects) {
             * DashFire.LogicSystem.NotifyGfxMoveControlFinish(ati.TargetObj, m_OwnSkill.SkillId, true);
             * }*/
            ClearDamagedObjIfNeed();
            m_LeaveDelObjects.Clear();
            m_MoreTimesEffectObjects.Clear();
            m_AttachedObjects.Clear();
            m_IsInited      = false;
            m_Owner         = null;
            m_OwnSkill      = null;
            m_DamageManager = null;
        }
Пример #12
0
 private void StopSkillInstance(SkillLogicInfo info, bool isInterrupt)
 {
     //LogSystem.Debug("Skill {0} finished.", info.SkillId);
     if (!isInterrupt)
     {
         if (info.SkillInst.IsControlMove)
         {
             LogicSystem.NotifyGfxMoveControlFinish(info.Sender, info.SkillId, true);
             info.SkillInst.IsControlMove = false;
         }
         LogicSystem.NotifyGfxAnimationFinish(info.Sender, true);
         LogicSystem.NotifyGfxStopSkill(info.Sender, info.SkillId);
     }
     else
     {
         if (info.SkillInst.IsControlMove)
         {
             info.SkillInst.IsControlMove = false;
         }
     }
     RecycleSkillInstance(info.Info);
 }
Пример #13
0
 public void StopMove()
 {
     m_MovementCom.StopMove();
     LogicSystem.NotifyGfxMoveControlFinish(gameObject);
 }