void Start()
    {
        XKGameVersionCtrl gameVersionCom = gameObject.AddComponent <XKGameVersionCtrl>();

        if (gameVersionCom != null)
        {
            gameVersionCom.Init();
        }

        if (IsLuPingTest)
        {
            gameObject.SetActive(false);
        }

        m_HasBegin = false;
        GameMode   = ReadGameInfo.GetInstance().ReadGameStarMode();
        if (GameMode == ReadGameInfo.GameMode.Oper.ToString())
        {
            m_FreeTexture.enabled    = false;
            CoinNumSet               = ReadGameInfo.GetInstance().ReadStarCoinNumSet();
            InsertCoinNum            = ReadGameInfo.GetInstance().ReadInsertCoinNum();
            CoinNumSetTex.spriteName = CoinNumSet;
            m_InserNum               = Convert.ToInt32(InsertCoinNum);
            m_CoinNumSet             = Convert.ToInt32(CoinNumSet);
            UpdateInsertCoin();
            UpdateTex();
        }
        else
        {
            m_ToubiObj.SetActive(false);
            m_FreeTexture.enabled = true;
        }
        m_Loading.SetActive(false);
        InputEventCtrl.GetInstance().mListenPcInputEvent.ClickSetEnterBtEvent += ClickSetEnterBtEvent;
        if (GameMode == ReadGameInfo.GameMode.Free.ToString())
        {
            InputEventCtrl.GetInstance().mListenPcInputEvent.ClickCloseDongGanBtEvent += ClickStartBtOneEvent;
        }
        else
        {
            InputEventCtrl.GetInstance().mListenPcInputEvent.ClickTVYaoKongEnterBtEvent += ClickStartBtOneEvent;
            InputEventCtrl.GetInstance().mListenPcInputEvent.ClickTVYaoKongExitBtEvent += ClickTVYaoKongExitBtEvent;
        }

        if (m_InserNum >= m_CoinNumSet && GameMode == ReadGameInfo.GameMode.Oper.ToString())
        {
            UpdateTex();
            //ClickStartBtOneEvent(InputEventCtrl.ButtonState.DOWN); 关闭自动开始游戏.
        }

        m_SSUICenterCom = gameObject.AddComponent <SSUICenter>();
        if (mUICamera != null)
        {
            m_SSUICenterCom.Init(mUICamera.transform);
        }

        InputEventCtrl.GetInstance().OnCaiPiaJiChuPiaoEvent += OnCaiPiaJiChuPiaoEvent;
        InputEventCtrl.GetInstance().OnCaiPiaJiWuPiaoEvent  += OnCaiPiaJiWuPiaoEvent;
    }
    void Start()
    {
        _Instance = this;
        XKGameVersionCtrl gmVersionCom = gameObject.AddComponent <XKGameVersionCtrl>();

        if (gmVersionCom != null)
        {
            gmVersionCom.Init();
        }

        if (IsOpenJingRuiJiaMi)
        {
            CreatJiaMiJianCeUI();
            StartJingRuiJiaMi();
        }
        else
        {
            LoadGame();
        }
    }
コード例 #3
0
    void Start()
    {
        _Instance = this;
        if (IsOpenJingRuiJiaMi == true && XKGameVersionCtrl.IsInit == false)
        {
            XKGameVersionCtrl gmVersionCom = gameObject.AddComponent <XKGameVersionCtrl>();
            if (gmVersionCom != null)
            {
                gmVersionCom.Init();
            }
        }

        bool isJiaoYanJingRui = false;

        if (IsOpenJingRuiJiaMi)
        {
            int val = PlayerPrefs.GetInt("JiaoYanJingRui");
            if (val == 0)
            {
                isJiaoYanJingRui = true;
            }
            else
            {
                //自动重启游戏时将会自动把JiaoYanJingRui设置为1,避免重复校验加密狗.
            }
            PlayerPrefs.SetInt("JiaoYanJingRui", 0);
        }

        if (IsOpenJingRuiJiaMi && isJiaoYanJingRui)
        {
            CreatJiaMiJianCeUI();
            StartJingRuiJiaMi();
        }
        else
        {
            LoadGame();
        }
    }
コード例 #4
0
    private void Awake()
    {
        Screen.showCursor  = false;
        m_GameLogo         = m_GameLogoInfo;
        m_GameVersionState = m_GameVersionType;
        XKGlobalData.m_GameVersionHddServer = m_GameVersionHddServer;
        switch (m_GameVersionHddServer)
        {
        case GameVersionHddServer.CeShiBan:
        {
            //设置游戏为红点点测试服务器版本信息.
            XKGameVersionCtrl.SetTestGameVersion();
            break;
        }

        case GameVersionHddServer.ZhengShiBan:
        {
            //设置红点点正式服务器版本信息.
            XKGameVersionCtrl.SetReleaseGameVersion();
            break;
        }
        }
    }