Newer
Older
DungeonShooting / DungeonShooting_Godot / src / config / ExcelConfig_Sound.cs
@小李xl 小李xl on 11 Jun 2023 974 bytes 完善音效
  1. using System.Text.Json.Serialization;
  2. using System.Collections.Generic;
  3.  
  4. namespace Config;
  5.  
  6. public static partial class ExcelConfig
  7. {
  8. public class Sound
  9. {
  10. /// <summary>
  11. /// 音效id
  12. /// </summary>
  13. [JsonInclude]
  14. public string Id;
  15.  
  16. /// <summary>
  17. /// 文件路径
  18. /// </summary>
  19. [JsonInclude]
  20. public string Path;
  21.  
  22. /// <summary>
  23. /// 音量(范围0 - 1)
  24. /// </summary>
  25. [JsonInclude]
  26. public float Volume;
  27.  
  28. /// <summary>
  29. /// 备注
  30. /// </summary>
  31. [JsonInclude]
  32. public string Remark;
  33.  
  34. /// <summary>
  35. /// 返回浅拷贝出的新对象
  36. /// </summary>
  37. public Sound Clone()
  38. {
  39. var inst = new Sound();
  40. inst.Id = Id;
  41. inst.Path = Path;
  42. inst.Volume = Volume;
  43. inst.Remark = Remark;
  44. return inst;
  45. }
  46. }
  47. }