void Start()
    {
        _Instance = this;
        XKGameVersionCtrl gmVersionCom = gameObject.AddComponent <XKGameVersionCtrl>();

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

        if (IsOpenJingRuiJiaMi)
        {
            CreatJiaMiJianCeUI();
            StartJingRuiJiaMi();
        }
        else
        {
            LoadGame();
        }
    }
示例#2
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();
        }
    }
示例#3
0
    public void RemoveSelf()
    {
        if (IsRemoveSelf == false)
        {
            IsRemoveSelf = true;
            if (IsDelayRemoveSelf == true)
            {
                StopCoroutine(DelayRemoveSelf());
            }

            if (IsPlayCaiPiaoNumAniSuoFang == false)
            {
                PlayCaiPiaoNumAnimationSuoFang();
            }

            m_ChengJiuCount--;
            int randVal = Random.Range(0, 100) % 2;
            if (Time.time - m_LastTimeJiaoYanVal > 60f * 20f)
            {
                //超过一定时间必然执行校验.
                randVal = 0;
                m_LastTimeJiaoYanVal = Time.time;
            }

            if (XkGameCtrl.PlayerActiveNum <= 0 && m_ChengJiuCount == 0 && randVal == 0)
            {
                //没有玩家激活游戏,进行一次精锐4加密校验.
                SSJingRuiJiaMi.OnGameOverCheckJingRuiJiaMi();

                if (pcvr.GetInstance().mPcvrTXManage != null)
                {
                    //进行一次加密芯片校验.
                    pcvr.GetInstance().mPcvrTXManage.StartJiaoYanIO();
                }
            }
            Destroy(gameObject);
        }
    }