예제 #1
0
        public void SetLicencesCallback(TDSLicenseCallback callback)
        {
            Command command = new Command.Builder()
                .Service(TDSLicenseConstants.TDS_LICENSE_SERVICE)
                .Method("setLicenseCallback")
                .Callback(true)
                .CommandBuilder();
                
            EngineBridge.GetInstance().CallHandler(command, (result) =>
             {
                 Debug.Log("result:" + result.toJSON());
                 if (result.code != Result.RESULT_SUCCESS)
                 {
                     return;
                 }

                 if (string.IsNullOrEmpty(result.content))
                 {
                     return;
                 }

                 Dictionary<string, object> dic = Json.Deserialize(result.content) as Dictionary<string, object>;
                 string success = SafeDictionary.GetValue<string>(dic, "login") as string;

                 if (success.Equals("success"))
                 {
                     callback.OnLicenseSuccess();
                 }
             });
        }
예제 #2
0
 public static void SetLicencesCallback(TDSLicenseCallback callback)
 {
     TDSLicenseImpl.GetInstance().SetLicencesCallback(callback);
 }