Newer
Older
DungeonShooting / DungeonShooting_Godot / excelTool / serialize / SerializeColor.cs
  1.  
  2.  
  3. using System.Text.Json.Serialization;
  4.  
  5. /// <summary>
  6. /// 可序列化的 Color 对象
  7. /// </summary>
  8. public class SerializeColor
  9. {
  10. public SerializeColor(float r, float g, float b, float a)
  11. {
  12. R = r;
  13. G = g;
  14. B = b;
  15. A = a;
  16. }
  17.  
  18. public SerializeColor()
  19. {
  20. }
  21. [JsonInclude]
  22. public float R { get; private set; }
  23. [JsonInclude]
  24. public float G { get; private set; }
  25. [JsonInclude]
  26. public float B { get; private set; }
  27. [JsonInclude]
  28. public float A { get; private set; }
  29.  
  30. }