CustomizeData.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. using System.Collections.Generic;
  2. using UnityEngine;
  3. using System;
  4. using Newtonsoft.Json;
  5. namespace DataTools
  6. {
  7. [Serializable]
  8. public class CustomizeData
  9. {
  10. [JsonProperty]
  11. [SerializeField]
  12. private string gender;
  13. [JsonProperty]
  14. [SerializeField]
  15. private string skin;
  16. [JsonProperty]
  17. [SerializeField]
  18. private List<CustomizeItem> items;
  19. [JsonProperty]
  20. [SerializeField]
  21. private List<CustomizeItemData> wearing;
  22. [JsonProperty]
  23. [SerializeField]
  24. private int fatness;
  25. [JsonIgnore]
  26. public string Gender
  27. {
  28. get
  29. {
  30. return gender;
  31. }
  32. set
  33. {
  34. gender = value;
  35. }
  36. }
  37. [JsonIgnore]
  38. public string Skin
  39. {
  40. get
  41. {
  42. return skin;
  43. }
  44. set
  45. {
  46. skin = value;
  47. }
  48. }
  49. [JsonIgnore]
  50. public List<CustomizeItem> Items
  51. {
  52. get
  53. {
  54. return items;
  55. }
  56. set
  57. {
  58. items = value;
  59. }
  60. }
  61. [JsonIgnore]
  62. public List<CustomizeItemData> Wearing
  63. {
  64. get
  65. {
  66. return wearing;
  67. }
  68. set
  69. {
  70. wearing = value;
  71. }
  72. }
  73. [JsonIgnore]
  74. public int Fatness
  75. {
  76. get
  77. {
  78. return fatness <= 5 ? fatness : 5;
  79. }
  80. set
  81. {
  82. fatness = value;
  83. }
  84. }
  85. }
  86. }