Exemplo n.º 1
0
    void OpenJiaoYanPanelObj(SelectJiaoZhunDate selectVal)
    {
        if (DirAdjustObj.activeSelf || PedalAdjustObj.activeSelf || GunAdjustObj.activeSelf)
        {
            if (!GunAdjustObj.activeSelf)
            {
                CloseAllJiaoYanPanel();
            }
            return;
        }

        IsMoveStar = false;
        StarObj.SetActive(false);
        switch (selectVal)
        {
        case SelectJiaoZhunDate.DirAdjust:
            InitAdjustDir();
            DirAdjustObj.SetActive(true);
            PedalAdjustObj.SetActive(false);
            GunAdjustObj.SetActive(false);
            IsJiaoZhunCross = false;
            SetPanelGunCrossCtrl.GetInstance().SetGunCrossActive(false);
            break;

        case SelectJiaoZhunDate.PedalAdjust:
            if (YouMenSt == YouMenTaBanEnum.JiaoTaBan)
            {
                TaBanAdjustSprite.spriteName = "JiaoZhunTB";
            }

            if (YouMenSt == YouMenTaBanEnum.YouMenTaBan)
            {
                TaBanAdjustSprite.spriteName = "JiaoZhunYMTB";
                pcvr.InitUpdateYouMenMinVal();
            }
            DirAdjustObj.SetActive(false);
            PedalAdjustObj.SetActive(true);
            GunAdjustObj.SetActive(false);
            IsJiaoZhunCross = false;
            SetPanelGunCrossCtrl.GetInstance().SetGunCrossActive(false);
            break;

        case SelectJiaoZhunDate.GunAdjust:
            InitAdjustGunCross();
            InitJiaoZhunGunUI();
            JiaoZhunZXCount = 0;
            DirAdjustObj.SetActive(false);
            PedalAdjustObj.SetActive(false);
            GunAdjustObj.SetActive(true);
            IsJiaoZhunCross = true;
            if (!pcvr.bIsHardWare)
            {
                Screen.showCursor = true;
            }
            SetPanelJiaoZhunDianCtrl.GetInstance().OpenJiaoZhunDian();
            break;
        }
    }
Exemplo n.º 2
0
 void CloseAllTestPanel()
 {
     DirTestPanelObj.SetActive(false);
     PedalTestPanelObj.SetActive(false);
     GunTestPanelObj.SetActive(false);
     QiNangTestPanelObj.SetActive(false);
     SetPanelGunCrossCtrl.GetInstance().SetGunCrossActive(false);
     StarObj.SetActive(true);
     StarMoveCount = StarMoveCount > 0 ? (StarMoveCount - 1) : 0;
     MoveStarImg();
 }
Exemplo n.º 3
0
    void OpenTestPanelObj(SelectCeShiDate SelCeShiDt)
    {
        if (DirTestPanelObj.activeSelf || PedalTestPanelObj.activeSelf || GunTestPanelObj.activeSelf)
        {
            CloseAllTestPanel();
            return;
        }

        switch (SelCeShiDt)
        {
        case SelectCeShiDate.DirTest:
            StarObj.SetActive(false);
            DirTestPanelObj.SetActive(true);
            PedalTestPanelObj.SetActive(false);
            GunTestPanelObj.SetActive(false);
            QiNangTestPanelObj.SetActive(false);
            break;

        case SelectCeShiDate.PedalTest:
            StarObj.SetActive(false);
            DirTestPanelObj.SetActive(false);
            PedalTestPanelObj.SetActive(true);
            GunTestPanelObj.SetActive(false);
            QiNangTestPanelObj.SetActive(false);
            break;

        case SelectCeShiDate.GunTest:
            StarObj.SetActive(false);
            DirTestPanelObj.SetActive(false);
            PedalTestPanelObj.SetActive(false);
            GunTestPanelObj.SetActive(true);
            QiNangTestPanelObj.SetActive(false);
            SetPanelGunCrossCtrl.GetInstance().SetGunCrossActive(true);
            SetPanelGunCrossCtrl.GetInstance().SetAimObjArrayActive(true);
            break;

        case SelectCeShiDate.QiNangTest:
            StarObj.SetActive(true);
            DirTestPanelObj.SetActive(false);
            PedalTestPanelObj.SetActive(false);
            GunTestPanelObj.SetActive(false);
            QiNangTestPanelObj.SetActive(true);
            QiNangTestState = QiNangTestEnum.Null;
            SetQiNangTestStarPosition();
            break;
        }
    }
Exemplo n.º 4
0
    void CloseAllJiaoYanPanel()
    {
        if (DirAdjustObj.activeSelf)
        {
            switch (AdjustDirSt)
            {
            case AdjustDirState.DirectionRight:
                AdjustDirSt = AdjustDirState.DirectionCenter;
                ChangeAdjustDirImg();
                if (!pcvr.bIsHardWare)
                {
                    pcvr.SaveSteerVal(InputEventCtrl.SteerValCur, PcvrValState.ValMax);
                }
                else
                {
                    pcvr.SaveSteerVal(pcvr.SteerValCur, PcvrValState.ValMax);
                }
                return;

            case AdjustDirState.DirectionCenter:
                AdjustDirSt = AdjustDirState.DirectionLeft;
                ChangeAdjustDirImg();
                if (!pcvr.bIsHardWare)
                {
                    pcvr.SaveSteerVal(InputEventCtrl.SteerValCur, PcvrValState.ValCenter);
                }
                else
                {
                    pcvr.SaveSteerVal(pcvr.SteerValCur, PcvrValState.ValCenter);
                }
                return;

            case AdjustDirState.DirectionLeft:
                if (!pcvr.bIsHardWare)
                {
                    pcvr.SaveSteerVal(InputEventCtrl.SteerValCur, PcvrValState.ValMin);
                }
                else
                {
                    pcvr.SaveSteerVal(pcvr.SteerValCur, PcvrValState.ValMin);
                }
                break;
            }
        }
        else if (PedalAdjustObj.activeSelf)
        {
            if (!pcvr.bIsHardWare)
            {
                pcvr.SaveTaBanVal(InputEventCtrl.TaBanValCur, PcvrValState.ValMax);
            }
            else
            {
                pcvr.SaveTaBanVal(pcvr.TaBanValCur, PcvrValState.ValMax);
            }
        }
        else if (GunAdjustObj.activeSelf)
        {
            if (pcvr.IsUseZhunXingJZ_36)
            {
                JiaoZhunZXCount++;
                //Debug.Log("JiaoZhunZXCount "+JiaoZhunZXCount);
                pcvr.SaveCrossPosInfo(AdjustGunDrossSt, JiaoZhunZXCount);
                if (JiaoZhunZXCount >= (int)pcvr.JZPoint)
                {
                    SetPanelGunCrossCtrl.GetInstance().SetAimObjArrayActive(false);
                    SetPanelGunCrossCtrl.GetInstance().SetGunCrossActive(true);
                }
                else
                {
                    return;
                }
            }
            else
            {
                pcvr.SaveCrossPosInfo(AdjustGunDrossSt);
                switch (AdjustGunDrossSt)
                {
                case AdjustGunDrossState.GunCrossLU:
                    AdjustGunDrossSt = AdjustGunDrossState.GunCrossRU;
                    ChangeAdjustGunCrossImg();
                    return;

                case AdjustGunDrossState.GunCrossRU:
                    AdjustGunDrossSt = AdjustGunDrossState.GunCrossRD;
                    ChangeAdjustGunCrossImg();
                    return;

                case AdjustGunDrossState.GunCrossRD:
                    AdjustGunDrossSt = AdjustGunDrossState.GunCrossLD;
                    ChangeAdjustGunCrossImg();
                    return;

                case AdjustGunDrossState.GunCrossLD:
                    if (!pcvr.IsUseLineHitCross)
                    {
                        AdjustGunDrossSt = AdjustGunDrossState.GunCrossOver;
                        SetPanelGunCrossCtrl.GetInstance().SetAimObjArrayActive(false);
                        SetPanelGunCrossCtrl.GetInstance().SetGunCrossActive(true);
                    }
                    else
                    {
                        ChangeJiaoZhunGunUI();
                        AdjustGunDrossSt = AdjustGunDrossState.GunCrossCen;
                        return;
                    }
                    break;

                case AdjustGunDrossState.GunCrossCen:
                    AdjustGunDrossSt = AdjustGunDrossState.GunCrossOver;
                    SetPanelGunCrossCtrl.GetInstance().SetAimObjArrayActive(false);
                    SetPanelGunCrossCtrl.GetInstance().SetGunCrossActive(true);
                    break;
                }
            }
        }

        DirAdjustObj.SetActive(false);
        PedalAdjustObj.SetActive(false);
        GunAdjustObj.SetActive(false);
        IsJiaoZhunCross = false;
        if (!pcvr.bIsHardWare)
        {
            Screen.showCursor = false;
        }

        IsMoveStar = true;
        StarObj.SetActive(true);
    }
Exemplo n.º 5
0
    void HanldeClickEnterBtEvent()
    {
        if (PanelStVal == PanelState.SetPanel)
        {
            SelectSetPanelDate DtEnum = (SelectSetPanelDate)StarMoveCount;
            switch (DtEnum)
            {
            case SelectSetPanelDate.CoinStart:
                if (GlobalData.GetInstance().XUTOUBI >= 10)
                {
                    GlobalData.GetInstance().XUTOUBI = 0;
                }
                GlobalData.GetInstance().XUTOUBI++;

                SetCoinStartLabelInfo();
                break;

            case SelectSetPanelDate.GameDiff:
                if (GameDiffState >= 3)
                {
                    GameDiffState = 0;
                }
                GlobalData.GetInstance().GameDiff = GameDiffState.ToString();
                SetGameDiffState();
                break;

            case SelectSetPanelDate.GameMode:
                IsFreeGameMode = !IsFreeGameMode;
                GlobalData.GetInstance().IsFreeMode = IsFreeGameMode;
                SetGameModeState();
                break;

            case SelectSetPanelDate.Adjust:
            case SelectSetPanelDate.HardwareTest:
                ChangeGuiPanel();
                break;

            case SelectSetPanelDate.ResetFactory:
                ResetFactoryInfo();
                break;

            case SelectSetPanelDate.GameAudioSet:
                GameAudioVolume++;
                if (GameAudioVolume > 10)
                {
                    GameAudioVolume = 0;
                }
                GameAudioVolumeLB.text = GameAudioVolume.ToString();
                handleJsonObj.WriteToFileXml(fileName, "GameAudioVolume", GameAudioVolume.ToString());
                GlobalData.GameAudioVolume = GameAudioVolume;
                break;

            case SelectSetPanelDate.GameAudioReset:
                GameAudioVolume        = 7;
                GameAudioVolumeLB.text = GameAudioVolume.ToString();
                handleJsonObj.WriteToFileXml(fileName, "GameAudioVolume", "7");
                GlobalData.GameAudioVolume = GameAudioVolume;
                break;

            case SelectSetPanelDate.Exit:
                ExitSetPanle();
                break;
            }
        }
        else if (PanelStVal == PanelState.JiaoYanPanel)
        {
            SelectJiaoZhunDate DtEnum = (SelectJiaoZhunDate)StarMoveCount;
            switch (DtEnum)
            {
            case SelectJiaoZhunDate.DirAdjust:
            case SelectJiaoZhunDate.PedalAdjust:
            case SelectJiaoZhunDate.GunAdjust:
                OpenJiaoYanPanelObj(DtEnum);
                break;

            case SelectJiaoZhunDate.Exit:
                OpenCeShiPanel();
                SetPanelGunCrossCtrl.GetInstance().SetGunCrossActive(false);
                break;
            }
        }
        else if (PanelStVal == PanelState.CeShiPanel)
        {
            SelectCeShiDate DtEnum = (SelectCeShiDate)StarMoveCount;
            switch (DtEnum)
            {
            case SelectCeShiDate.DirTest:
            case SelectCeShiDate.PedalTest:
            case SelectCeShiDate.GunTest:
            case SelectCeShiDate.QiNangTest:
                if (QiNangTestPanelObj.activeSelf)
                {
                    OnClickQiNangTestEnvent();
                }
                else
                {
                    OpenTestPanelObj(DtEnum);
                }
                break;

            case SelectCeShiDate.Exit:
                OpenSetPanel();
                break;
            }
        }
    }