Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / data / PropFragmentInfo.cs
@小李xl 小李xl on 22 Mar 2024 2 KB 生成道具逻辑属性表表
  1.  
  2. using System;
  3. using System.Collections.Generic;
  4.  
  5. /// <summary>
  6. /// 道具逻辑片段数据
  7. /// </summary>
  8. public class PropFragmentInfo
  9. {
  10. public class PropFragmentArgInfo
  11. {
  12. /// <summary>
  13. /// 参数索引
  14. /// </summary>
  15. public int ArgIndex;
  16. /// <summary>
  17. /// 参数描述
  18. /// </summary>
  19. public string Description;
  20. public PropFragmentArgInfo(int argIndex, string description)
  21. {
  22. ArgIndex = argIndex;
  23. Description = description;
  24. }
  25. }
  26. /// <summary>
  27. /// buff 名称
  28. /// </summary>
  29. public string Name;
  30. /// <summary>
  31. /// buff 描述
  32. /// </summary>
  33. public string Description;
  34. /// <summary>
  35. /// buff 类
  36. /// </summary>
  37. public Type Type;
  38. /// <summary>
  39. /// buff 参数信息
  40. /// </summary>
  41. public List<PropFragmentArgInfo> ArgInfos = new List<PropFragmentArgInfo>();
  42. public PropFragmentInfo(FragmentAttribute attribute, Type type)
  43. {
  44. Name = attribute.Name;
  45. Description = attribute.Description;
  46. Type = type;
  47.  
  48. if (attribute.Arg1 != null)
  49. {
  50. ArgInfos.Add(new PropFragmentArgInfo(1, attribute.Arg1));
  51. }
  52. if (attribute.Arg2 != null)
  53. {
  54. ArgInfos.Add(new PropFragmentArgInfo(2, attribute.Arg2));
  55. }
  56. if (attribute.Arg3 != null)
  57. {
  58. ArgInfos.Add(new PropFragmentArgInfo(3, attribute.Arg3));
  59. }
  60. if (attribute.Arg4 != null)
  61. {
  62. ArgInfos.Add(new PropFragmentArgInfo(4, attribute.Arg4));
  63. }
  64. if (attribute.Arg5 != null)
  65. {
  66. ArgInfos.Add(new PropFragmentArgInfo(5, attribute.Arg5));
  67. }
  68. if (attribute.Arg6 != null)
  69. {
  70. ArgInfos.Add(new PropFragmentArgInfo(6, attribute.Arg6));
  71. }
  72. if (attribute.Arg7 != null)
  73. {
  74. ArgInfos.Add(new PropFragmentArgInfo(7, attribute.Arg7));
  75. }
  76. if (attribute.Arg8 != null)
  77. {
  78. ArgInfos.Add(new PropFragmentArgInfo(8, attribute.Arg8));
  79. }
  80. }
  81. }