Example #1
0
        private void CrateData(byte[] bytes, bool changed)
        {
            Dictionary <string, object> plist = Plist.readPlist(bytes) as Dictionary <string, object>;

            Merge((Dictionary <string, object>)plist ["Data"]);
            if (this.onCompleteDelegate != null)
            {
                this.onCompleteDelegate(changed);
            }
            AdManager adManager = AdManager.instant;

            if (!changed)
            {
                SGAdsConfig.Instant.StartLoader();
            }
            isLoad = true;
        }
Example #2
0
 private SGConfig(OnCompleteDelegate onCompleteDelegate = null) : base()
 {
                 #if UNITY_IOS
     configInitPath = "Cogfig_init_IOS.plist";
                 #else
     configInitPath = "Cogfig_init_Android.plist";
                 #endif
     this.onCompleteDelegate = onCompleteDelegate;
     TextAsset textAsset = Resources.Load(configInitPath, typeof(TextAsset)) as TextAsset;
     if (textAsset.bytes != null)
     {
         Dictionary <string, object> plist = Plist.readPlist(DESUtil.Decrypt(textAsset.bytes, FileUtil.sKey)) as Dictionary <string, object>;
         _data           = (Dictionary <string, object>)plist ["Data"];
         remoteUrl       = GetStringValue("", "ConfigPath", "RemoteConfig");
         localPath       = GetStringValue("", "ConfigPath", "LocalConfig");
         extendLocalPath = Application.persistentDataPath + "//" + localPath;
     }
 }