Newer
Older
DungeonShooting / DungeonShooting_Godot / src / config / ExcelConfig_BulletBase.cs
  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 BulletBase
  9. {
  10. /// <summary>
  11. /// 子弹id
  12. /// </summary>
  13. [JsonInclude]
  14. public string Id;
  15.  
  16. /// <summary>
  17. /// 子弹名称
  18. /// </summary>
  19. [JsonInclude]
  20. public string Name;
  21.  
  22. /// <summary>
  23. /// 子弹类型: <br/>
  24. /// 实体子弹:1 <br/>
  25. /// 激光子弹:2
  26. /// </summary>
  27. [JsonInclude]
  28. public int Type;
  29.  
  30. /// <summary>
  31. /// 绑定子弹预制体,根据Type填不同的参数 <br/>
  32. /// Type为1,填ActivityBase表Id <br/>
  33. /// Type为2,填场景路径
  34. /// </summary>
  35. [JsonInclude]
  36. public string Prefab;
  37.  
  38. /// <summary>
  39. /// 返回浅拷贝出的新对象
  40. /// </summary>
  41. public BulletBase Clone()
  42. {
  43. var inst = new BulletBase();
  44. inst.Id = Id;
  45. inst.Name = Name;
  46. inst.Type = Type;
  47. inst.Prefab = Prefab;
  48. return inst;
  49. }
  50. }
  51. }