Exemple #1
0
    public static HeartBeat_Play getInstance()
    {
        if (s_instance == null)
        {
            if (PlayServiceSocket.s_instance != null)
            {
                s_instance = PlayServiceSocket.s_instance.gameObject.GetComponent <HeartBeat_Play>();
            }
        }

        return(s_instance);
    }
Exemple #2
0
    public void stopHeartBeat()
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("HeartBeat_Play_hotfix", "stopHeartBeat"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.HeartBeat_Play_hotfix", "stopHeartBeat", null, null);
            return;
        }

        CancelInvoke("reqHeartBeat");
        CancelInvoke("onInvoke_timeout");

        s_instance = null;
    }