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(); } }
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(); } }