コード例 #1
0
    void Move(float deltaTime)
    {
        //笔直朝前走就好了.
        Vector2 direction = new Vector2(-owner.transform.forward.x, -owner.transform.forward.z);

        if (direction == Vector2.zero)
        {
            return;
        }
        //如果摇杆按着边缘的方向键,触发任意方向,则移动,否则,旋转目标。
        //跳跃的时候,方向轴移动不受控制,模拟跳跃
        if (owner.IsOnGround())
        {
            if (owner.posMng.CanMove && owner.Speed > 0)
            {
                direction.Normalize();
                float runSpeed = owner.Speed;//跑的速度 1000 = 145M/S 按原来游戏计算

                Vector2 runTrans = direction * runSpeed * deltaTime;
                //怪物和AI在预览中无法跑动

                owner.Move(new Vector3((runTrans * 0.130f).x, 0, (runTrans * 0.130f).y));
                if (owner.posMng.mActiveAction.Idx != CommonAction.Run)
                {
                    owner.posMng.ChangeAction(CommonAction.Run);
                }

                //小于30码防御吧。后面配置好数据
                if (Vector3.Distance(targetPos, owner.transform.position) <= 30)
                {
                    //还是防御先。
                    //Status = EAIStatus.Defence;
                    owner.Defence();
                    return;
                }
            }
        }
    }
コード例 #2
0
    //防御,换武器,爆气3连处理.
    public bool ProcessNormalAction(MeteorUnit Owner)
    {
        MeteorInput Input = Owner.controller.Input;

        if (Input.HasInput((int)EKeyList.KL_Defence, (int)EInputType.EIT_Pressing))
        {
            Owner.Defence();
            return(true);
        }
        else
        if (Input.HasInput((int)EKeyList.KL_ChangeWeapon, (int)EInputType.EIT_Click))
        {
            Owner.ChangeWeapon();
            return(true);
        }
        return(false);
    }
コード例 #3
0
    public void ProcessBehaviour(MeteorUnit target)
    {
        PoseStatus  posMng = target.posMng;
        MeteorInput Input  = target.controller.Input;
        MeteorUnit  Owner  = target;

        //后面改为状态机 遵循 当前动作-遍历每一个中断动作-扫描切换所需状态.符合则切换(关键是这个状态表不好生成)
        //除了idle以外还有其他预备动作,都可以随意切换
        if (posMng.mActiveAction.Idx == CommonAction.Idle ||
            PoseStatus.IsReadyAction(posMng.mActiveAction.Idx) ||
            posMng.mActiveAction.Idx == CommonAction.Dead)//动作是假死,角色没有挂
        {
            if (ProcessNormalAction(Owner))
            {
                return;
            }
            else if (Input.HasInput((int)EKeyList.KL_Help, (int)EInputType.EIT_Click))
            {
                //复活队友
                Owner.posMng.ChangeAction(CommonAction.Reborn);
            }
            else if (Input.HasInput((int)EKeyList.KL_Defence, (int)EInputType.EIT_Pressing))
            {
                Owner.Defence();
                return;
            }
            else
            if (Input.HasInput((int)EKeyList.KL_Crouch, (int)EInputType.EIT_Pressing))
            {
                Owner.OnCrouch();
                return;
            }
            else if (Input.HasInput((int)EKeyList.KL_Jump, (int)EInputType.EIT_ShortRelease) && Owner.IsOnGround())
            {
                Jump(Owner, Input.mInputVector, Input.KeyStates[(int)EKeyList.KL_Jump].PressedTime / MeteorInput.ShortPressTime);
            }
            else if (Input.HasInput((int)EKeyList.KL_Jump, (int)EInputType.EIT_FullPress) && Owner.IsOnGround())
            {
                Jump(Owner, Input.mInputVector);
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyW, (int)EInputType.EIT_DoubleClick))
            {
                //这里要判断武器
                Owner.IdleRush();
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyS, (int)EInputType.EIT_DoubleClick))
            {
                //这里要判断武器
                Owner.IdleRush(1);
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyA, (int)EInputType.EIT_DoubleClick))
            {
                //这里要判断武器
                Owner.IdleRush(2);
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyD, (int)EInputType.EIT_DoubleClick))
            {
                //这里要判断武器
                Owner.IdleRush(3);
            }
            else
            if (Input.mInputVector != Vector2.zero)
            {
                Move(Owner, Input.mInputVector);
            }
        }
        else if (posMng.mActiveAction.Idx == CommonAction.Crouch || (posMng.mActiveAction.Idx >= CommonAction.CrouchForw && posMng.mActiveAction.Idx <= CommonAction.CrouchBack))
        {
            if (Owner.GetWeaponType() == (int)EquipWeaponType.Gun && Owner.GunReady)
            {
                ProcessGunAction(Owner);
                return;
            }

            //除了不能防御
            if (ProcessNormalAction(Owner))
            {
                return;
            }
            else
            if (Input.HasInput((int)EKeyList.KL_Crouch, (int)EInputType.EIT_Releasing))
            {
                posMng.ChangeAction(CommonAction.Idle, 0.1f);
            }
            else if (Input.HasInput((int)EKeyList.KL_Jump, (int)EInputType.EIT_ShortRelease) && Owner.IsOnGround())
            {
                Jump(Owner, Input.mInputVector, Input.KeyStates[(int)EKeyList.KL_Jump].PressedTime / MeteorInput.ShortPressTime);
            }
            else if (Input.HasInput((int)EKeyList.KL_Jump, (int)EInputType.EIT_FullPress) && Owner.IsOnGround())
            {
                Jump(Owner, Input.mInputVector);
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyW, (int)EInputType.EIT_DoubleClick))
            {
                //这里要判断武器
                Owner.CrouchRush();
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyS, (int)EInputType.EIT_DoubleClick))
            {
                //这里要判断武器
                Owner.CrouchRush(1);
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyA, (int)EInputType.EIT_DoubleClick))
            {
                //这里要判断武器
                Owner.CrouchRush(2);
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyD, (int)EInputType.EIT_DoubleClick))
            {
                //这里要判断武器
                Owner.CrouchRush(3);
            }
            else if (Input.mInputVector != Vector2.zero)
            {
                MoveOnCrouch(Owner, Input.mInputVector);
            }
            else if (Input.mInputVector == Vector2.zero && !posMng.Rotateing)
            {
                if (posMng.mActiveAction.Idx != CommonAction.Crouch)
                {
                    posMng.ChangeAction(CommonAction.Crouch, 0.1f);
                }
            }
        }
        else if (posMng.mActiveAction.Idx == CommonAction.Run || posMng.mActiveAction.Idx == CommonAction.RunOnDrug)
        {
            if (Input.HasInput((int)EKeyList.KL_Help, (int)EInputType.EIT_Click))
            {
                //复活队友
                Owner.posMng.ChangeAction(CommonAction.Reborn);
            }
            else if (Input.HasInput((int)EKeyList.KL_Crouch, (int)EInputType.EIT_Pressing))
            {
                Owner.OnCrouch();
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyW, (int)EInputType.EIT_DoubleClick))
            {
                Owner.IdleRush();
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyS, (int)EInputType.EIT_DoubleClick))
            {
                //这里要判断武器
                Owner.IdleRush(1);
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyA, (int)EInputType.EIT_DoubleClick))
            {
                //这里要判断武器
                Owner.IdleRush(2);
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyD, (int)EInputType.EIT_DoubleClick))
            {
                //这里要判断武器
                Owner.IdleRush(3);
            }
            else
            if (Input.mInputVector == Vector2.zero)
            {
                posMng.ChangeAction(0, 0.1f);
            }
            else
            if (Input.HasInput((int)EKeyList.KL_Jump, (int)EInputType.EIT_ShortRelease) && Owner.IsOnGround())
            {
                Jump(Owner, Input.mInputVector, Input.KeyStates[(int)EKeyList.KL_Jump].PressedTime / MeteorInput.ShortPressTime);
            }
            else if (Input.HasInput((int)EKeyList.KL_Jump, (int)EInputType.EIT_FullPress) && Owner.IsOnGround())
            {
                Jump(Owner, Input.mInputVector);
            }
            else
            if (ProcessNormalAction(Owner))
            {
                return;
            }
            else if (Input.mInputVector != Vector2.zero)
            {
                Move(Owner, Input.mInputVector);
            }
        }
        else if (posMng.mActiveAction.Idx == CommonAction.WalkLeft)
        {
            if (Input.HasInput((int)EKeyList.KL_Crouch, (int)EInputType.EIT_Pressing))
            {
                Owner.OnCrouch();
            }
            else
            if (Input.HasInput((int)EKeyList.KL_Jump, (int)EInputType.EIT_ShortRelease) && Owner.IsOnGround())
            {
                Jump(Owner, Input.mInputVector, Input.KeyStates[(int)EKeyList.KL_Jump].PressedTime / MeteorInput.ShortPressTime);
            }
            else if (Input.HasInput((int)EKeyList.KL_Jump, (int)EInputType.EIT_FullPress) && Owner.IsOnGround())
            {
                Jump(Owner, Input.mInputVector);
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyW, (int)EInputType.EIT_DoubleClick))
            {
                Owner.IdleRush();
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyS, (int)EInputType.EIT_DoubleClick))
            {
                //这里要判断武器
                Owner.IdleRush(1);
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyA, (int)EInputType.EIT_DoubleClick))
            {
                //这里要判断武器
                Owner.IdleRush(2);
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyD, (int)EInputType.EIT_DoubleClick))
            {
                //这里要判断武器
                Owner.IdleRush(3);
            }
            else if (!posMng.Rotateing && Input.mInputVector == Vector2.zero)
            {
                posMng.ChangeAction(CommonAction.Idle, 0.1f);
            }
            else if (ProcessNormalAction(Owner))
            {
                return;
            }
            else if (Input.mInputVector != Vector2.zero)
            {
                Move(Owner, Input.mInputVector);
            }
        }
        else if (posMng.mActiveAction.Idx == CommonAction.WalkRight)
        {
            if (Input.HasInput((int)EKeyList.KL_Crouch, (int)EInputType.EIT_Pressing))
            {
                Owner.OnCrouch();
            }
            else
            if (Input.HasInput((int)EKeyList.KL_Jump, (int)EInputType.EIT_ShortRelease) && Owner.IsOnGround())
            {
                Jump(Owner, Input.mInputVector, Input.KeyStates[(int)EKeyList.KL_Jump].PressedTime / MeteorInput.ShortPressTime);
            }
            else
            if (Input.HasInput((int)EKeyList.KL_Jump, (int)EInputType.EIT_FullPress) && Owner.IsOnGround())
            {
                Jump(Owner, Input.mInputVector);
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyW, (int)EInputType.EIT_DoubleClick))
            {
                Owner.IdleRush();
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyS, (int)EInputType.EIT_DoubleClick))
            {
                //这里要判断武器
                Owner.IdleRush(1);
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyA, (int)EInputType.EIT_DoubleClick))
            {
                //这里要判断武器
                Owner.IdleRush(2);
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyD, (int)EInputType.EIT_DoubleClick))
            {
                //这里要判断武器
                Owner.IdleRush(3);
            }
            else if (!posMng.Rotateing && Input.mInputVector == Vector2.zero)
            {
                posMng.ChangeAction(CommonAction.Idle, 0.1f);
            }
            else if (ProcessNormalAction(Owner))
            {
                return;
            }
            else if (Input.mInputVector != Vector2.zero)
            {
                Move(Owner, Input.mInputVector);
            }
        }
        else if (posMng.mActiveAction.Idx == CommonAction.WalkBackward)
        {
            if (Input.HasInput((int)EKeyList.KL_Crouch, (int)EInputType.EIT_Pressing))
            {
                Owner.OnCrouch();
            }
            else
            if (Input.HasInput((int)EKeyList.KL_Jump, (int)EInputType.EIT_ShortRelease) && Owner.IsOnGround())
            {
                Jump(Owner, Input.mInputVector, Input.KeyStates[(int)EKeyList.KL_Jump].PressedTime / MeteorInput.ShortPressTime);
                //Debug.LogError("jumpback");
            }
            else
            if (Input.HasInput((int)EKeyList.KL_Jump, (int)EInputType.EIT_FullPress) && Owner.IsOnGround())
            {
                Jump(Owner, Input.mInputVector);
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyW, (int)EInputType.EIT_DoubleClick))
            {
                Owner.IdleRush();
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyS, (int)EInputType.EIT_DoubleClick))
            {
                //这里要判断武器
                Owner.IdleRush(1);
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyA, (int)EInputType.EIT_DoubleClick))
            {
                //这里要判断武器
                Owner.IdleRush(2);
            }
            else
            if (Input.HasInput((int)EKeyList.KL_KeyD, (int)EInputType.EIT_DoubleClick))
            {
                //这里要判断武器
                Owner.IdleRush(3);
            }
            else if (!posMng.Rotateing && Input.mInputVector == Vector2.zero)
            {
                posMng.ChangeAction(CommonAction.Idle, 0.1f);
            }
            else if (ProcessNormalAction(Owner))
            {
                return;
            }
            else if (Input.mInputVector != Vector2.zero)
            {
                Move(Owner, Input.mInputVector);
            }
        }
        else if ((posMng.mActiveAction.Idx >= CommonAction.BrahchthrustDefence &&
                  posMng.mActiveAction.Idx <= CommonAction.HammerDefence) ||
                 (posMng.mActiveAction.Idx >= CommonAction.ZhihuDefence &&
                  posMng.mActiveAction.Idx <= CommonAction.RendaoDefence))
        {
            //还有乾坤刀的其他2种姿势没处理
            if (Input.HasInput((int)EKeyList.KL_Defence, (int)EInputType.EIT_Releasing))
            {
                Owner.ReleaseDefence();
            }
        }
        else if (posMng.mActiveAction.Idx == CommonAction.Struggle || posMng.mActiveAction.Idx == CommonAction.Struggle0)  //地面挣扎.僵直中无法输入.
        {
            if (Owner.IsOnGround())
            {
                if (Input.HasInput((int)EKeyList.KL_KeyW, (int)EInputType.EIT_Release))
                {
                    posMng.ChangeAction(CommonAction.DCForw, 0.1f);
                }
                else if (Input.HasInput((int)EKeyList.KL_KeyS, (int)EInputType.EIT_Release))
                {
                    posMng.ChangeAction(CommonAction.DCBack, 0.1f);
                }
                else if (Input.HasInput((int)EKeyList.KL_KeyA, (int)EInputType.EIT_Release))
                {
                    posMng.ChangeAction(CommonAction.DCLeft, 0.1f);
                }
                else if (Input.HasInput((int)EKeyList.KL_KeyD, (int)EInputType.EIT_Release))
                {
                    posMng.ChangeAction(CommonAction.DCRight, 0.1f);
                }
                else if (Input.HasInput((int)EKeyList.KL_Jump, (int)EInputType.EIT_ShortRelease))
                {
                    Jump(Owner, Input.mInputVector, Input.KeyStates[(int)EKeyList.KL_Jump].PressedTime / MeteorInput.ShortPressTime);
                }
                else if (Input.HasInput((int)EKeyList.KL_Jump, (int)EInputType.EIT_FullPress))
                {
                    Jump(Owner, Input.mInputVector);
                }
                else if (Input.HasInput((int)EKeyList.KL_Defence, (int)EInputType.EIT_Click))
                {
                    if (posMng.mActiveAction.Idx == CommonAction.Struggle)
                    {
                        Owner.posMng.ChangeAction(CommonAction.IdleBack, 0.1f);
                    }
                    else if (posMng.mActiveAction.Idx == CommonAction.Struggle0)
                    {
                        Owner.posMng.ChangeAction(CommonAction.IdleFront, 0.1f);
                    }
                }
            }
        }
        else if (Owner.Climbing)
        {
            if (Input.HasInput((int)EKeyList.KL_KeyW, (int)EInputType.EIT_Release))
            {
                //Owner.ProcessFall();
                Owner.posMng.ChangeAction(CommonAction.JumpFall);
            }
            else if (Owner.ImpluseVec.y > 0 && Owner.OnTouchWall)
            {
                if (Input.HasInput((int)EKeyList.KL_Jump, (int)EInputType.EIT_Click))
                {
                    //Debug.LogError("ProcessTouchWallJump");
                    Owner.ProcessTouchWallJump(true);
                }
            }
            else if (Input.HasInput((int)EKeyList.KL_Jump, (int)EInputType.EIT_Click))
            {
                //Debug.LogError("ProcessJump2");
                Owner.ProcessJump2();
            }
        }
        else if (posMng.mActiveAction.Idx >= CommonAction.Jump && posMng.mActiveAction.Idx <= CommonAction.WallLeftJump)
        {
            if (Input.HasInput((int)EKeyList.KL_ChangeWeapon, (int)EInputType.EIT_Click))
            {
                Owner.ChangeWeapon();
            }
            else if (Owner.ImpluseVec.y > 0)
            {
                if (Input.HasInput((int)EKeyList.KL_Jump, (int)EInputType.EIT_Click))
                {
                    Owner.ProcessJump2();
                }
            }
        }
        else if (posMng.mActiveAction.Idx == CommonAction.GunIdle)
        {
            ProcessGunAction(Owner);
        }
        else if (posMng.IsHurtPose() &&
                 Input.HasInput((int)EKeyList.KL_BreakOut, (int)EInputType.EIT_Click))
        {
            Owner.DoBreakOut();
        }
    }
コード例 #4
0
    //动作播放完毕,切换下一个可连接动作.
    public void OnActionFinished()
    {
        if (waitPause)
        {
            //
        }
        else
        {
            //使用火枪,状态机与普通状态机不一致
            if (_Self.GetWeaponType() == (int)EquipWeaponType.Gun)
            {
                //212=>213
                if (mActiveAction.Idx == CommonAction.GunReload)
                {
                    ChangeAction(CommonAction.GunIdle, 0.1f);
                }
                else
                {
                    //213=>213
                    if (mActiveAction.Idx == CommonAction.GunIdle)
                    {
                        ChangeAction(CommonAction.GunIdle);
                    }
                    else
                    {
                        //其他有重装子弹的进入212
                        if (mActiveAction.Link != 0)
                        {
                            if (mActiveAction.Next != null)
                            {
                                ChangeAction(mActiveAction.Link, mActiveAction.Next.Time);
                            }
                            else
                            {
                                ChangeAction(mActiveAction.Link);
                            }
                        }
                        else
                        {
                            if (!_Self.GunReady)
                            {
                                if (mActiveAction.Next != null)
                                {
                                    ChangeAction(CommonAction.Idle, 0.1f);
                                }
                                else
                                {
                                    ChangeAction(CommonAction.Idle);
                                }
                            }
                            else
                            {
                                //没有重装子弹的进入213
                                if (mActiveAction.Next != null)
                                {
                                    ChangeAction(CommonAction.GunIdle, mActiveAction.Next.Time);
                                }
                                else
                                {
                                    ChangeAction(CommonAction.GunIdle);
                                }
                            }
                        }
                    }
                }
            }
            else
            {
                if (LinkInput.ContainsKey(mActiveAction.Idx))
                {
                    int TargetActionIdx = mActiveAction.Idx;
                    if (mActiveAction.Next != null)
                    {
                        ChangeAction(LinkInput[mActiveAction.Idx], mActiveAction.Next.Time);//
                    }
                    else
                    {
                        ChangeAction(LinkInput[mActiveAction.Idx]);
                    }
                    LinkInput.Clear();
                }
                else
                {
                    if (mActiveAction.Link != 0)
                    {
                        if (mActiveAction.Next != null)
                        {
                            ChangeAction(mActiveAction.Link, 0.1f);
                        }
                        else
                        {
                            ChangeAction(mActiveAction.Link);
                        }
                    }
                    else
                    {
                        if (_Self.IsOnGround())
                        {
                            //如果处于防御-受击状态中,恢复为防御pose
                            if (onDefence)
                            {
                                _Self.Defence();
                            }
                            else
                            if (_Self.GetLockedTarget() != null)
                            {
                                int ReadyAction = 0;
                                switch ((EquipWeaponType)_Self.GetWeaponType())
                                {
                                case EquipWeaponType.Knife: ReadyAction = CommonAction.KnifeReady; break;

                                case EquipWeaponType.Sword: ReadyAction = CommonAction.SwordReady; break;

                                case EquipWeaponType.Blade: ReadyAction = CommonAction.BladeReady; break;

                                case EquipWeaponType.Lance: ReadyAction = CommonAction.LanceReady; break;

                                case EquipWeaponType.Brahchthrust: ReadyAction = CommonAction.BrahchthrustReady; break;

                                case EquipWeaponType.Dart: ReadyAction = CommonAction.DartReady; break;

                                case EquipWeaponType.Gloves: ReadyAction = CommonAction.ZhihuReady; break;    //没找到

                                case EquipWeaponType.Guillotines: ReadyAction = CommonAction.GuillotinesReady; break;

                                case EquipWeaponType.Hammer: ReadyAction = CommonAction.HammerReady; break;

                                case EquipWeaponType.NinjaSword: ReadyAction = CommonAction.RendaoReady; break;

                                case EquipWeaponType.HeavenLance:
                                    switch (_Self.GetWeaponSubType())
                                    {
                                    case 0: ReadyAction = CommonAction.QK_BADAO_READY; break;

                                    case 1: ReadyAction = CommonAction.QK_CHIQIANG_READY; break;

                                    case 2: ReadyAction = CommonAction.QK_JUHE_READY; break;
                                    }
                                    break;

                                case EquipWeaponType.Gun: ReadyAction = CommonAction.GunReady; break;
                                }
                                if (mActiveAction.Next != null)
                                {
                                    ChangeAction(ReadyAction, 0.1f);
                                }
                                else
                                {
                                    ChangeAction(ReadyAction);
                                }
                            }
                            else
                            {
                                if (mActiveAction.Next != null)
                                {
                                    ChangeAction(CommonAction.Idle, 0.1f);
                                }
                                else
                                {
                                    ChangeAction(CommonAction.Idle);
                                }
                                //ChangeAction(CommonAction.Idle, 0.1f);
                            }
                        }
                        else
                        {
                            ChangeAction(CommonAction.JumpFall, 0.1f);
                        }
                    }
                }
            }
        }
    }
コード例 #5
0
    public void OnActionFinished()
    {
        if (OnDebugActionFinished != null)
        {
            OnDebugActionFinished();
        }
        if (waitPause)
        {
            //死亡后接事件
            if (OnActionFinishedEvt != null)
            {
                OnActionFinishedEvt();//关闭碰撞盒
                OnActionFinishedEvt = null;
            }
        }
        else
        {
            if (mActiveAction.Idx == CommonAction.Struggle0 || mActiveAction.Idx == CommonAction.Struggle)
            {
                return;
            }

            //使用火枪,状态机与普通状态机不一致
            if (_Self.GetWeaponType() == (int)EquipWeaponType.Gun)
            {
                //212=>213
                if (mActiveAction.Idx == CommonAction.GunReload)
                {
                    ChangeAction(CommonAction.GunIdle, 0.1f);
                }
                else
                {
                    if (_Self.IsOnGround())
                    {
                        //213=>213
                        if (mActiveAction.Idx == CommonAction.GunIdle)
                        {
                            ChangeAction(CommonAction.GunIdle);
                        }
                        else
                        {
                            if (LinkInput.ContainsKey(mActiveAction.Idx))
                            {
                                //拿着火枪在空中踢人.
                                //int TargetActionIdx = mActiveAction.Idx;
                                if (mActiveAction.Next != null)
                                {
                                    ChangeAction(LinkInput[mActiveAction.Idx], mActiveAction.Next.Time);//
                                }
                                else
                                {
                                    ChangeAction(LinkInput[mActiveAction.Idx], 0.1f);//ok
                                }
                                LinkInput.Clear();
                            }
                            else
                            if (mActiveAction.Link != 0)
                            {
                                if (mActiveAction.Next != null)
                                {
                                    ChangeAction(mActiveAction.Link, mActiveAction.Next.Time);
                                }
                                else
                                {
                                    ChangeAction(mActiveAction.Link, 0.1f);
                                }
                            }
                            else
                            {
                                if (!_Self.GunReady)
                                {
                                    if (mActiveAction.Next != null)
                                    {
                                        ChangeAction(CommonAction.Idle, mActiveAction.Next.Time);
                                    }
                                    else
                                    {
                                        ChangeAction(CommonAction.Idle, 0.1f);
                                    }
                                }
                                else
                                {
                                    //没有重装子弹的进入213
                                    if (mActiveAction.Next != null)
                                    {
                                        ChangeAction(CommonAction.GunIdle, mActiveAction.Next.Time);
                                    }
                                    else
                                    {
                                        ChangeAction(CommonAction.GunIdle, 0.1f);
                                    }
                                }
                            }
                        }
                    }
                    else if (_Self.posMng.onhurt)
                    {
                        //浮空受击.
                    }
                    else
                    {
                        ChangeAction(CommonAction.JumpFall);//拿着枪从空中落下.
                    }
                }
            }
            else
            {
                if (LinkInput.ContainsKey(mActiveAction.Idx))
                {
                    //int TargetActionIdx = mActiveAction.Idx;
                    if (mActiveAction.Next != null)
                    {
                        ChangeAction(LinkInput[mActiveAction.Idx], mActiveAction.Next.Time);//
                    }
                    else
                    {
                        ChangeAction(LinkInput[mActiveAction.Idx], 0.1f);//ok
                    }
                    LinkInput.Clear();
                }
                else
                {
                    if (mActiveAction.Link != 0)
                    {
                        if (mActiveAction.Next != null)
                        {
                            ChangeAction(mActiveAction.Link, mActiveAction.Next.Time);
                        }
                        else
                        {
                            ChangeAction(mActiveAction.Link, 0.01f);//给一个微弱得过渡时间,因为一些动作过渡需要把d_base得偏移对上去(针对152接180导致得角色轻微位移)
                        }
                    }
                    else
                    {
                        if (_Self.IsOnGround())
                        {
                            //如果处于防御-受击状态中,恢复为防御pose
                            if (onDefence)
                            {
                                _Self.Defence();
                            }
                            else
                            if (_Self.LockTarget != null && Main.Ins.GameStateMgr.gameStatus.AutoLock)
                            {
                                int ReadyAction = 0;
                                switch ((EquipWeaponType)_Self.GetWeaponType())
                                {
                                case EquipWeaponType.Knife: ReadyAction = CommonAction.KnifeReady; break;

                                case EquipWeaponType.Sword: ReadyAction = CommonAction.SwordReady; break;

                                case EquipWeaponType.Blade: ReadyAction = CommonAction.BladeReady; break;

                                case EquipWeaponType.Lance: ReadyAction = CommonAction.LanceReady; break;

                                case EquipWeaponType.Brahchthrust: ReadyAction = CommonAction.BrahchthrustReady; break;

                                case EquipWeaponType.Dart: ReadyAction = CommonAction.DartReady; break;

                                case EquipWeaponType.Gloves: ReadyAction = CommonAction.GloveReady; break;

                                case EquipWeaponType.Guillotines: ReadyAction = CommonAction.GuillotinesReady; break;

                                case EquipWeaponType.Hammer: ReadyAction = CommonAction.HammerReady; break;

                                case EquipWeaponType.NinjaSword: ReadyAction = CommonAction.RendaoReady; break;

                                case EquipWeaponType.HeavenLance:
                                    switch (_Self.GetWeaponSubType())
                                    {
                                    case 0: ReadyAction = CommonAction.QK_BADAO_READY; break;

                                    case 1: ReadyAction = CommonAction.QK_CHIQIANG_READY; break;

                                    case 2: ReadyAction = CommonAction.QK_JUHE_READY; break;
                                    }
                                    break;

                                case EquipWeaponType.Gun: ReadyAction = CommonAction.GunReady; break;
                                }
                                if (mActiveAction.Next != null)
                                {
                                    ChangeAction(ReadyAction, mActiveAction.Next.Time);
                                }
                                else
                                {
                                    ChangeAction(ReadyAction, 0.1f);
                                }
                            }
                            else
                            {
                                if (mActiveAction.Next != null)
                                {
                                    ChangeAction(CommonAction.Idle, mActiveAction.Next.Time);
                                }
                                else
                                {
                                    ChangeAction(CommonAction.Idle, 0.1f);
                                }
                            }
                        }
                        else if (_Self.posMng.onhurt)
                        {
                            //Debug.Log("目标受到伤害浮空");
                        }
                        else
                        {
                            ChangeAction(CommonAction.JumpFall);
                        }
                    }
                }
            }
        }
    }