Exemplo n.º 1
0
        public static void Dispose()
        {
            if (isInit)
            {
                Dictionary <string, string> data = new Dictionary <string, string>();
                data.Add(SDKInterfaceDefine.ModuleName, SDKInterfaceDefine.ModuleName_Dispose);

                Call(data);

                s_callBackListener.sdkCallBack = null;
                GameObject.Destroy(s_callBackListener.gameObject);
                s_callBackListener = null;

                isInit = false;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 初始化
        /// </summary>
        public static void Init()
        {
            if (!isInit)
            {
                GameObject go = new GameObject(c_callBackObjectName);
                s_callBackListener             = go.AddComponent <SDKCallBackListener>();
                s_callBackListener.sdkCallBack = OnSDKCallBack;

                Dictionary <string, string> data = new Dictionary <string, string>();
                data.Add(SDKInterfaceDefine.ModuleName, SDKInterfaceDefine.ModuleName_Init);
                data.Add(SDKInterfaceDefine.ListenerName, c_callBackObjectName);

                Call(data);
                isInit = true;
            }
        }