Ejemplo n.º 1
0
    void ClickStartBtFourEvent(pcvr.ButtonState state)
    {
        if (XkGameCtrl.IsActivePlayerFour)
        {
            return;
        }

        if (!StartBtObj.activeSelf)
        {
            return;
        }

        if (GameOverCtrl.IsShowGameOver)
        {
            return;
        }
        XKGlobalData.GetInstance().PlayStartBtAudio();
        SubCoinPlayerFour();
        StartBtObj.SetActive(false);
        XkGameCtrl.SetActivePlayerFour(true);
        ActiveZhanDouObj();

        if (XKGlobalData.GameVersionPlayer != 0)
        {
            XKGlobalData.CoinPlayerTwo = XKGlobalData.CoinPlayerFour;
        }
    }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        _Instance = this;
        if (HandleJsonObj == null)
        {
            HandleJsonObj = HandleJson.GetInstance();
        }
        Time.timeScale = 1.0f;
        GameOverCtrl.IsShowGameOver = false;
        pcvr.DongGanState           = 1;
        StarObj               = StarTran.gameObject;
        DirAdjustObj          = AdjustDir.gameObject;
        AdjustYouMenShaCheObj = AdjustYouMenShaCheUI.gameObject;
        QiNangCQObj.SetActive(false);
        XkGameCtrl.SetActivePlayerOne(false);
        XkGameCtrl.SetActivePlayerTwo(false);
        XkGameCtrl.SetActivePlayerThree(false);
        XkGameCtrl.SetActivePlayerFour(false);
        pcvr.CloseAllQiNangArray(PlayerEnum.Null, 1);
        pcvr.OpenCheckYouMenValInfo();
        pcvr.GetInstance().CloseFangXiangPanPower();
        SetGameTextInfo();

        SetStarObjActive(true);
        SetAnJianTestPanel(1);

        InitHandleJson();
        InitStarImgPos();
        InitCoinStartLabel();
        InitGameDiffDuiGou();
        InitGameModeDuiGou();
        InitGameDianJiSpeed();
        InitGameAudioValue();
        InitGameVersionPlayer();

        InputEventCtrl.GetInstance().ClickSetEnterBtEvent         += ClickSetEnterBtEvent;
        InputEventCtrl.GetInstance().ClickSetMoveBtEvent          += ClickSetMoveBtEvent;
        InputEventCtrl.GetInstance().ClickFireBtOneEvent          += ClickFireBtOneEvent;
        InputEventCtrl.GetInstance().ClickFireBtTwoEvent          += ClickFireBtTwoEvent;
        InputEventCtrl.GetInstance().ClickFireBtThreeEvent        += ClickFireBtThreeEvent;
        InputEventCtrl.GetInstance().ClickFireBtFourEvent         += ClickFireBtFourEvent;
        InputEventCtrl.GetInstance().ClickDaoDanBtOneEvent        += ClickDaoDanBtOneEvent;
        InputEventCtrl.GetInstance().ClickDaoDanBtTwoEvent        += ClickDaoDanBtTwoEvent;
        InputEventCtrl.GetInstance().ClickDaoDanBtThreeEvent      += ClickDaoDanBtThreeEvent;
        InputEventCtrl.GetInstance().ClickDaoDanBtFourEvent       += ClickDaoDanBtFourEvent;
        InputEventCtrl.GetInstance().ClickStartBtOneEvent         += ClickStartBtEventP1;
        InputEventCtrl.GetInstance().ClickStartBtTwoEvent         += ClickStartBtEventP2;
        InputEventCtrl.GetInstance().ClickStartBtThreeEvent       += ClickStartBtEventP3;
        InputEventCtrl.GetInstance().ClickStartBtFourEvent        += ClickStartBtEventP4;
        InputEventCtrl.GetInstance().ClickStopDongGanBtOneEvent   += ClickStopDongGanBtEventP1;
        InputEventCtrl.GetInstance().ClickStopDongGanBtTwoEvent   += ClickStopDongGanBtEventP2;
        InputEventCtrl.GetInstance().ClickStopDongGanBtThreeEvent += ClickStopDongGanBtEventP3;
        InputEventCtrl.GetInstance().ClickStopDongGanBtFourEvent  += ClickStopDongGanBtEventP4;
    }
Ejemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        _Instance = this;
        if (HandleJsonObj == null)
        {
            HandleJsonObj = HandleJson.GetInstance();
        }
        Time.timeScale = 1.0f;
        GameOverCtrl.IsShowGameOver = false;
        //pcvr.DongGanState = 1;
        StarObj = StarTran.gameObject;
        XkGameCtrl.SetActivePlayerOne(false);
        XkGameCtrl.SetActivePlayerTwo(false);
        XkGameCtrl.SetActivePlayerThree(false);
        XkGameCtrl.SetActivePlayerFour(false);
        //SetGameTextInfo();

        SetStarObjActive(true);

        InitHandleJson();
        InitStarImgPos();
        InitCoinStartLabel();
        InitGameDiffDuiGou();
        InitGameModeDuiGou();
        InitCoinToCard();
        InitPrintCaiPiaoUI();
        InitCaiPiaoPrintState();
        //InitGameAudioValue();

        InputEventCtrl.GetInstance().ClickSetEnterBtEvent += ClickSetEnterBtEvent;
        InputEventCtrl.GetInstance().ClickSetMoveBtEvent  += ClickSetMoveBtEvent;

        InputEventCtrl.GetInstance().ClickFireBtOneEvent   += ClickFireBtOneEvent;
        InputEventCtrl.GetInstance().ClickFireBtTwoEvent   += ClickFireBtTwoEvent;
        InputEventCtrl.GetInstance().ClickFireBtThreeEvent += ClickFireBtThreeEvent;

        InputEventCtrl.GetInstance().ClickDaoDanBtOneEvent   += ClickDaoDanBtOneEvent;
        InputEventCtrl.GetInstance().ClickDaoDanBtTwoEvent   += ClickDaoDanBtTwoEvent;
        InputEventCtrl.GetInstance().ClickDaoDanBtThreeEvent += ClickDaoDanBtThreeEvent;

        InputEventCtrl.GetInstance().ClickStartBtOneEvent   += ClickStartBtEventP1;
        InputEventCtrl.GetInstance().ClickStartBtTwoEvent   += ClickStartBtEventP2;
        InputEventCtrl.GetInstance().ClickStartBtThreeEvent += ClickStartBtEventP3;

        //InputEventCtrl.GetInstance().click += ClickStartBtEventP1;
        //InputEventCtrl.GetInstance().ClickStartBtTwoEvent += ClickStartBtEventP2;
        //InputEventCtrl.GetInstance().ClickStartBtThreeEvent += ClickStartBtEventP3;
    }