Result.cs 700 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using UnityEngine;
  3. namespace TapSDK.Core
  4. {
  5. [Serializable]
  6. public class Result
  7. {
  8. public static int RESULT_SUCCESS = 0;
  9. public static int RESULT_ERROR = -1;
  10. [SerializeField] public int code;
  11. [SerializeField] public string message;
  12. [SerializeField] public string content;
  13. [SerializeField] public string callbackId;
  14. [SerializeField] public bool onceTime;
  15. public Result()
  16. {
  17. }
  18. public Result(string json)
  19. {
  20. JsonUtility.FromJsonOverwrite(json, this);
  21. }
  22. public string ToJSON()
  23. {
  24. return JsonUtility.ToJson(this);
  25. }
  26. }
  27. }