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(); } }); }
public static void SetLicencesCallback(TDSLicenseCallback callback) { TDSLicenseImpl.GetInstance().SetLicencesCallback(callback); }