public void ShowDirWrongInfo()
    {
        if (StartGameTimeCtrl.GetInstance().CheckIsActiveStartTime())
        {
            return;
        }

        if (PlayerYueJieCtrl.GetInstance().CheckIsShowPlayerYueJie())
        {
            return;
        }

        if (gameObject.activeSelf)
        {
            return;
        }

        gameObject.SetActive(true);
        //AudioListCtrl.PlayAudio(AudioListCtrl.GetInstance().AudioGameJingGao);
        AudioListCtrl.PlayAudioLoopJingGao();
        PlayerAutoFire.HandlePlayerCloseShenXingState();
        PlayerAutoFire.AddPlayerHitZhangAiNum();
        if (!IsInvoking("MakePlayerBackToPath"))
        {
            Invoke("MakePlayerBackToPath", 1.5f);
        }
    }
    // Use this for initialization
    void Start()
    {
        _Instance = this;
        gameObject.SetActive(false);
        UISprite yueJieSprite = GetComponent <UISprite>();

        yueJieSprite.enabled = true;
    }
    public void ResetIsActivePlayer()
    {
        IsActivePlayer = false;
        ZhunXingCtrl.GetInstance().ClosePlayerZhunXing();
        DirectionInfoCtrl.GetInstance().HiddenDirWrong();
        PlayerYueJieCtrl.GetInstance().ClosePlayerYueJie();

        ActiveDaJuCtrl.GetInstanceP1().ActivePlayerBlood(false);
        ActiveDaJuCtrl.GetInstanceP2().ActivePlayerBlood(false);
    }
    void CheckPlayerVerticalHit()
    {
        bool isMoveInWater = false;

        RaycastHit hitInfo;
        Vector3    startPos   = PlayerTran.position + Vector3.up * 5f;
        Vector3    forwardVal = Vector3.down;

        Physics.Raycast(startPos, forwardVal, out hitInfo, 30f, GameCtrlXK.GetInstance().PlayerVertHitLayer.value);
        if (hitInfo.collider != null)
        {
            //Debug.DrawLine(startPos, hitInfo.point, Color.red);
            GameObject objHit = hitInfo.collider.gameObject;
            if (objHit.layer == LayerMask.NameToLayer(GameCtrlXK.WaterLayer))
            {
                isMoveInWater = true;
            }
        }

        if (IsMoveingWater != isMoveInWater)
        {
            IsMoveingWater = isMoveInWater;
            if (!IsMoveingWater)
            {
                IsRecordTimeMoveOut = false;
                TimeOutWaterVal     = Time.realtimeSinceStartup;
                TimeMoveOutWater    = Time.realtimeSinceStartup;
            }
        }

        bool isCloseYueJie = false;

        if (!IsMoveingWater)
        {
            if (Time.realtimeSinceStartup - TimeOutWaterVal > 0.3f && !IsRecordTimeMoveOut)
            {
                IsRecordTimeMoveOut = true;
                TimeMoveOutWater    = Time.realtimeSinceStartup;
                PlayerYueJieCtrl.GetInstance().ShowPlayerYueJie();                 //Show yueJieInfo
            }

            if (Time.realtimeSinceStartup - TimeMoveOutWater > 2f)
            {
                TimeMoveOutWater = Time.realtimeSinceStartup;                 //back player, close yueJieInfo
                IsBackPlayer     = true;
                isCloseYueJie    = true;
                IsMoveingWater   = true;
            }
        }
        else
        {
            if (Time.realtimeSinceStartup - TimeMoveOutWater > 0.3f)
            {
                isCloseYueJie = true;
            }
        }

        if (isCloseYueJie)
        {
            PlayerYueJieCtrl.GetInstance().ClosePlayerYueJie();             //close yueJieInfo
        }
    }
    void CalculateEnginePower()
    {
        float timeAdd = 200f;
        float timeSub = 10f * timeAdd;
        float dTime   = Time.deltaTime;

        float mouseDownCountTmp = MouseDownCountP_1 + MouseDownCountP_2;

        if (mouseDownCountTmp > 0 ||
            IsActiveXieTong ||
            IsActiveHuanYingFu ||
            IntoPuBuCtrl.IsIntoPuBu ||
            IsActiveBingLu)
        {
            float maxVelocity = 0f;
            if (mMaxMouseDownCount < MouseDownCountP_1)
            {
                mMaxMouseDownCount = MouseDownCountP_1;
            }

            if (mMaxMouseDownCount < MouseDownCountP_2)
            {
                mMaxMouseDownCount = MouseDownCountP_2;
            }

            if (mouseDownCountTmp > mMaxMouseDownCount)
            {
                mouseDownCountTmp = mMaxMouseDownCount;
            }

            if (PlayerYueJieCtrl.GetInstance().CheckIsShowPlayerYueJie())
            {
                maxVelocity = PlayerYueJieCtrl.YueJieSpeed;
                CloseHuanYingFuState();
            }
            else if (IntoPuBuCtrl.IsIntoPuBu)
            {
                if (mSpeed < IntoPuBuCtrl.PlayerMvSpeed)
                {
                    Vector3 forwardVal = PlayerTran.forward;
                    forwardVal.y = 0f;
                    rigObj.AddForce(forwardVal * 90000f);
                }
                maxVelocity = IntoPuBuCtrl.PlayerMvSpeed;
            }
            else if (IsActiveHuanYingFu)
            {
                if (mSpeed < PlayerAutoFire.HuanYingSpeed)
                {
                    rigObj.AddForce(PlayerTran.forward * 90000f);
                }
                maxVelocity = PlayerAutoFire.HuanYingSpeed;
            }
            else if (IsActiveXieTong)
            {
                maxVelocity = XieTongSpeed;
            }
            else if (IsActiveBingLu)
            {
                if (mSpeed < BingLuSpeed)
                {
                    rigObj.AddForce(PlayerTran.forward * 9000f);
                }
                maxVelocity = BingLuSpeed;
            }
            else
            {
                float velocityTmp = (mouseDownCountTmp / mMaxMouseDownCount) * mMaxVelocityFoot;
                if (mouseDownCountTmp > 0)
                {
                    maxVelocity = velocityTmp;
                }

                if (maxVelocity > mMaxVelocityFoot)
                {
                    maxVelocity = mMaxVelocityFoot;
                }
            }

            if (mSpeed >= maxVelocity)
            {
                currentEnginePower -= dTime * timeAdd;
            }
            else
            {
                currentEnginePower += dTime * timeAdd;
                if (currentEnginePower < PlayerAutoFire.MinPowerPlayer)
                {
                    currentEnginePower = PlayerAutoFire.MinPowerPlayer;
                }
            }
        }
        else
        {
            if (currentEnginePower < 0)
            {
                currentEnginePower = 0;
            }
            else if (currentEnginePower > 0)
            {
                currentEnginePower -= PlayerAutoFire.SubPlayerEnginePower * dTime * timeSub;

                if (currentEnginePower < 0)
                {
                    currentEnginePower = 0;
                }
            }
        }

        float maxPower = GlobalData.PlayerPowerShipMax;

        if (currentEnginePower > maxPower)
        {
            currentEnginePower = maxPower;
        }

        float power = currentEnginePower;

        mThrottleForce = power * rigidbody.mass;
    }