Exemplo n.º 1
0
        public void Init(object initData, System.Action <string, bool> callback)
        {
            mLoggedIn     = SecurePrefs.GetInt("DeviceLoggedIn", 0) > 0;
            mDeviceAuthId = SecurePrefs.GetString("DeviceAuthId", Device.UniqueIdentifier);

            callback(null, true);
        }
Exemplo n.º 2
0
        public void InitSDK(object options, System.Action <string, bool> callback)
        {
#if UNITY_EDITOR
            mIsInited   = false;
            mIsLoggedIn = false;
            callback(null, mIsInited);
#elif UNITY_IPHONE
            if (mIsInited)
            {
                callback(null, true);
            }
            else
            {
                new GameObject("as_callback", typeof(SparxAsSDKManager));

                //int appId = Dot.Integer("appId", options, 2241);
                //string appKey = Dot.String("appKey", options, "9d5e83cf5653400b959cd03c422579c6");
                int    appId  = Dot.Integer("appId", options, 2356);
                string appKey = Dot.String("appKey", options, "2cd489c773204183af5c30c44360501e");
                pxAsInit(appId, appKey);
                mIsInited   = true;
                mIsLoggedIn = SecurePrefs.GetInt("AsUid", 0) > 0;
                callback(null, mIsInited);
            }
#else
            mIsInited   = false;
            mIsLoggedIn = false;
            callback(null, mIsInited);
#endif
        }
Exemplo n.º 3
0
 public int GetInt(string key_, int defaultValue_ = 0)
 {
     key_ = TransKey(key_);
     return(SecurePrefs.GetInt(key_, defaultValue_));
 }