Esempio n. 1
0
    void HitDownOnGround()
    {
        if (!IsHitDownOnGround)
        {
            return;
        }

        if (IsHuanYuanStand)
        {
            if (_gameBody.GetAcMsg(_gameBody.GetStandACName(), 2) == "completed")
            {
                IsHitDownOnGround = false;
                ReSetAll();
                _isGetOver = true;
            }
            return;
        }



        if (_gameBody.GetAcMsg(HitGroundACName) == "completed")
        {
            IsHuanYuanStand = true;
        }


        //if (_gameBody.GetDB().animation.lastAnimationName == HitGroundACName && _gameBody.GetDB().animation.isCompleted)
        //{
        //    IsHitDownOnGround = false;
        //    ReSetAll();
        //    _isGetOver = true;
        //    return;
        //}

        //if (_gameBody.GetDB().animation.lastAnimationName != HitGroundACName)
        //{
        //    print("落地动作  " + _gameBody.GetDB().animation.lastAnimationName);
        //    _gameBody.isAcing = true;
        //    _gameBody.GetDB().animation.GotoAndPlayByFrame(HitGroundACName);
        //    print("落地动作  " + _gameBody.GetDB().animation.lastAnimationName);
        //}
    }
Esempio n. 2
0
    void ChongjiBegin()
    {
        if (!IsChongjiHX2Start)
        {
            return;
        }

        if (_roledate.isBeHiting || _roledate.isDie || _gameBody.IsGround || _gameBody.IsHitWall)
        {
            ReSetAll();
            IsChongjiOver = true;
            return;
        }

        if (IsChongjiOver)
        {
            return;
        }
        if (isStartChongji)
        {
            _gameBody.isAcing = true;
            if (!IsInStartAC)
            {
                IsInStartAC       = true;
                _gameBody.isAcing = true;

                _gameBody.RunACChange(CJ_Start);
                _gameBody.GetDB().animation.FadeIn(CJ_Start, 0.2f);
                //_gameBody.GetDB().animation.GotoAndPlayByTime(CJ_Start, 0);
                //print("  进入 飞行 冲击动作  "+ CJ_Start+"   是否包含该动作 "+ _gameBody.GetDB().animation.HasAnimation(CJ_Start)+"    当前动作???  "+ _gameBody.GetDB().animation.lastAnimationName);

                Lizi_Huoyan.Play();
                ChongJiHitKuai.SetActive(true);
                SelfHitKuai.SetActive(false);

                //伤害变动
                GetComponent <JN_Date>().atkPower = ChongjiShanghai;
            }

            if (!IsToEnd && GetComponent <AIAirRunNear>().ZhijieMoveToPoint(TargetPos, 1, MinSpeed, false, true, MaxSpeed))
            {
                IsToEnd = true;
                //还原到 站立动作
                _gameBody.RunACChange(MoRenRunACName);
                print(" 还原的 跑动动作是啥?????????MoRenRunACName    " + MoRenRunACName);
                _gameBody.isAcing = false;

                _gameBody.GetAcMsg(_gameBody.GetStandACName());
                ReSetAll();
                IsChongjiOver = true;
            }

            if (!_gameBody.isAcing)
            {
                ReSetAll();
                IsChongjiOver = true;
            }

            return;
        }

        if (_gameBody.GetDB().animation.lastAnimationName == CJ_Begin && !_gameBody.isAcing)
        {
            isStartChongji = true;
        }
    }