コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: Bridge.cs プロジェクト: WatchMan-Wang/TAPSDK_UPM
 public static EngineBridge GetInstance()
 {
     lock (locker)
     {
         if (sInstance == null)
         {
             sInstance = new EngineBridge();
         }
     }
     return(sInstance);
 }
コード例 #3
0
        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));
            });
        }
コード例 #4
0
        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));
            });
        }
コード例 #5
0
 private TDSCommonImpl()
 {
     EngineBridge.GetInstance().Register(TDSCommonConstants.TDS_COMMON_SERVICE_CLZ, TDSCommonConstants.TDS_COMMON_SERVICE_IMPL);
 }