public static void LoadDiffJson(Dictionary <string, System.Object> out_dict) { if (out_dict != null) { ProcessDict(out_dict); } if (completeCallBack != null) { DI18n.completeCallBack(); DI18n.completeCallBack = null; } }
// public static string DbPath(string dbCachebreaker) // { // string dbDirPath = Application.persistentDataPath + "/locales/"; // if (!Directory.Exists (dbDirPath)) { // Directory.CreateDirectory (dbDirPath); // } // return dbDirPath + "locales_" + DoamBuild.GAME_VERSION + "_" + dbCachebreaker + ".sqdb"; // } // // public DbAccess DbInstance () // { // // Set db variable // string dbPath = DI18n.DbPath(ApplicationVO.localeDbCachebreaker); // // string dbPath = FileSystem.CacheFileDir ("locales") + "locales_" + ApplicationVO.localeDbCachebreaker + ".sqdb"; // db = DbAccess.GetInstance (dbPath, DBType.LOCALE); // // return db; // } // public static void Clear () // { //// int sqlite_cost_count = _instance.sqlite_costs.Count; //// int proto_cost_count = _instance.protobuf_costs.Count; //// double sqlite_total_cost = 0.0; //// double proto_total_cost = 0.0; //// //// foreach(double i in _instance.sqlite_costs) { //// sqlite_total_cost += i; //// } //// foreach(double i in _instance.protobuf_costs) { //// proto_total_cost += i; //// } //// // DoamLogger.Fatal(StepStone.ErrorType.FeLogicErrorCrash, (int)type, "Error log: " + logString + stackTrace); //// string log = "SQLite Total Count: " + sqlite_cost_count.ToString() + ", Total Cost: " + sqlite_total_cost.ToString() + ", Average Cost: " + (sqlite_total_cost / sqlite_cost_count).ToString() + " |||||| " + "Protobuf Total Count: " + proto_cost_count.ToString() + ", Total Cost: " + proto_total_cost.ToString() + ", Average Cost: " + (proto_total_cost / proto_cost_count).ToString(); //// //// DoamLogger.Fatal(StepStone.ErrorType.NoError, 1, log); // // if (_instance != null) { // _instance.DbInstance().CloseSqlConnection(); // _instance = null; // } // } public static void Load(string language, OutCompleteCallBack completeCallBack = null) { if (completeCallBack != null) { DI18n.completeCallBack = completeCallBack; } _instance = new DI18n(language); // if (DI18n.protobuf == true) { // LoadLocaleIndex(language); // } else { // LoadData (language); // } }