Beispiel #1
0
 /// <summary>
 /// 登出成功回调
 /// </summary>
 /// <param name="info"></param>
 void onLogoutSuccess(string info)
 {
     AllSdkMain.instance().log(info);
     if (mLogoutSuccessCallback != null)
     {
         mLogoutSuccessCallback(info);
     }
 }
Beispiel #2
0
        /// <summary>
        /// 获取单例
        /// </summary>
        /// <returns></returns>
        public static AllSdkMain instance()
        {
            _instance = GameObject.FindObjectOfType(typeof(AllSdkMain)) as AllSdkMain;
            if (_instance == null)
            {
                GameObject obj = new GameObject("AllSdkMain");
                _instance = obj.AddComponent <AllSdkMain>();
            }
            GameObject.DontDestroyOnLoad(_instance.gameObject);

            return(_instance);
        }