public void SetLanguage(string language) { Dictionary <string, object> dic = new Dictionary <string, object>(); dic.Add("language", language); Command command = new Command(TDSCommonConstants.TDS_COMMON_SERVICE_CLZ, "setLanguage", false, dic); EngineBridge.GetInstance().CallHandler(command); }
public static EngineBridge GetInstance() { lock (locker) { if (sInstance == null) { sInstance = new EngineBridge(); } } return(sInstance); }
public void IsTapTapGlobalInstalled(Action <bool> callback) { Command command = new Command(TDSCommonConstants.TDS_COMMON_SERVICE_CLZ, "isTapGlobalInstalled", true, null); EngineBridge.GetInstance().CallHandler(command, (result) => { if (result.code != Result.RESULT_SUCCESS) { callback(false); return; } if (string.IsNullOrEmpty(result.content)) { callback(false); return; } callback(BridgeBooleanWrapper.GetBoolFromDic("isTapGlobalInstalled", result.content)); }); }
public void UpdateGameInTapTap(string appId, Action <bool> callback) { Dictionary <string, object> dic = new Dictionary <string, object>(); dic.Add("appId", appId); Command command = new Command(TDSCommonConstants.TDS_COMMON_SERVICE_CLZ, "updateGameInTapTap", true, dic); EngineBridge.GetInstance().CallHandler(command, (result) => { if (result.code != Result.RESULT_SUCCESS) { callback(false); return; } if (string.IsNullOrEmpty(result.content)) { callback(false); return; } callback(BridgeBooleanWrapper.GetBoolFromDic("updateGameInTapTap", result.content)); }); }
private TDSCommonImpl() { EngineBridge.GetInstance().Register(TDSCommonConstants.TDS_COMMON_SERVICE_CLZ, TDSCommonConstants.TDS_COMMON_SERVICE_IMPL); }