Example #1
0
    void FlyToPot()
    {
        if (IsStartFlyToPot && _runNear.ZhijieMoveToPoint(FlyToPos.position, 1, 4, false))
        {
            IsStartFlyToPot = false;
            IsStartXiaya    = true;
            print("到达 准备 下压高点!");

            XiaYaTot = new Vector2(this.transform.position.x, this.transform.position.y - 20);

            //龙吼声
            LongHou.Play();
        }
    }
Example #2
0
 void GoInAtkPoint()
 {
     //如果前面 碰到地板 就结束了
     GetAtkPot();
     if (_aiAirRunNear.ZhijieMoveToPoint(_atkPot, 0.6f, 10))
     {
         IsShoting      = true;
         IsGoInAtkPoint = false;
     }
 }
Example #3
0
    //定位目标
    protected virtual bool GetNearTarget()
    {
        print("鱼 冲击 接近目标----------------  接近 ");
        if (this.transform.position.x > _targetObj.position.x)
        {
            //print("目标在左侧!!!  "+this.transform.position.x+"    -------x    "+ _targetObj.position.x);
            _airGameBody.TurnLeft();
        }
        else
        {
            //print("目标在---右侧!!!");
            _airGameBody.TurnRight();
        }

        return(runNear.ZhijieMoveToPoint(_targetObj.transform.position, _atkDistance * 4, 1));

        //return runNear.Zhuiji(_atkDistance,false);
    }
Example #4
0
    void FlyToChosePoint()
    {
        if (GetComponent <RoleDate>().isBeHiting || GetComponent <RoleDate>().isDie)
        {
            ReSetAll();
        }



        if (!IsStartFlying)
        {
            return;
        }
        if (_aiAirRunNear.ZhijieMoveToPoint(ChosePos, 1, FlySpeed, false, true, FlyMaxSpeed))
        {
            ReSetAll();
            print(" 到达目标地点!!!! ");
        }
    }
Example #5
0
    void MoveToPos()
    {
        if (!IsStartMove)
        {
            return;
        }
        //print("  ---------------------------- IsStartMove "+ IsStartMove);

        if (GetComponent <RoleDate>().isBeHiting || GetComponent <RoleDate>().isDie)
        {
            ReSetAll();
            return;
        }



        //移动过去
        if (MoveType == 1)
        {
            //A*寻路
            if (IsAXunlu)
            {
                if (_aiRunNear.ZhuijiPointZuoBiao(chosePos, 1, MoveSpeed))
                {
                    StartAtkAC();
                }
            }
            else
            {
                //print("   zhijie yi dong!!! MoveSpeed     " + MoveSpeed);
                if (_aiRunNear.ZhijieMoveToPoint(chosePos, 1, MoveSpeed))
                {
                    print(" dao da mubiao dian weizhi !!! ");
                    StartAtkAC();
                }
            }
        }
        else if (MoveType == 2)
        {
            //闪现过去
            this.transform.position = chosePos;
            StartAtkAC();
        }
        else if (MoveType == 3)
        {
            //隐身过去
            if (!IsYinSheng)
            {
                IsYinSheng = true;
                _yinshen.TempStart();
            }
            if (IsShowing)
            {
                this.transform.position = chosePos;
                if (_yinshen.IsShowOut())
                {
                    StartAtkAC();
                    _yinshen.ReSetAll();
                }
                return;
            }
            if (_yinshen.IsGetHide())
            {
                IsShowing = true;
            }
        }
    }