A stable modding interface between Techblox and mods https://mod.exmods.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

147 lines
4.8KB

  1. namespace TechbloxModdingAPI.Blocks
  2. {
  3. using RobocraftX.Common;
  4. using Svelto.ECS;
  5. public class Servo : SignalingBlock
  6. {
  7. /// <summary>
  8. /// Constructs a(n) Servo object representing an existing block.
  9. /// </summary>
  10. public Servo(EGID egid) :
  11. base(egid)
  12. {
  13. }
  14. /// <summary>
  15. /// Constructs a(n) Servo object representing an existing block.
  16. /// </summary>
  17. public Servo(uint id) :
  18. base(new EGID(id, CommonExclusiveGroups.SERVO_BLOCK_GROUP))
  19. {
  20. }
  21. /// <summary>
  22. /// Gets or sets the Servo's MaximumForce property. Tweakable stat.
  23. /// </summary>
  24. public float MaximumForce
  25. {
  26. get
  27. {
  28. return BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).servoVelocity;
  29. }
  30. set
  31. {
  32. BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).servoVelocity = value;
  33. }
  34. }
  35. /// <summary>
  36. /// Gets or sets the Servo's MinimumAngle property. Tweakable stat.
  37. /// </summary>
  38. public float MinimumAngle
  39. {
  40. get
  41. {
  42. return BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).minDeviation;
  43. }
  44. set
  45. {
  46. BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).minDeviation = value;
  47. }
  48. }
  49. /// <summary>
  50. /// Gets or sets the Servo's MaximumAngle property. Tweakable stat.
  51. /// </summary>
  52. public float MaximumAngle
  53. {
  54. get
  55. {
  56. return BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).maxDeviation;
  57. }
  58. set
  59. {
  60. BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).maxDeviation = value;
  61. }
  62. }
  63. /// <summary>
  64. /// Gets or sets the Servo's Reverse property. Tweakable stat.
  65. /// </summary>
  66. public bool Reverse
  67. {
  68. get
  69. {
  70. return BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).reverse;
  71. }
  72. set
  73. {
  74. BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).reverse = value;
  75. }
  76. }
  77. /// <summary>
  78. /// Gets or sets the Servo's InputIsAngle property. Tweakable stat.
  79. /// </summary>
  80. public bool InputIsAngle
  81. {
  82. get
  83. {
  84. return BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).hasProportionalInput;
  85. }
  86. set
  87. {
  88. BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).hasProportionalInput = value;
  89. }
  90. }
  91. /// <summary>
  92. /// Gets or sets the Servo's DirectionVector property. May not be saved.
  93. /// </summary>
  94. public Unity.Mathematics.float3 DirectionVector
  95. {
  96. get
  97. {
  98. return BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).directionVector;
  99. }
  100. set
  101. {
  102. BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).directionVector = value;
  103. }
  104. }
  105. /// <summary>
  106. /// Gets or sets the Servo's RotationAxis property. May not be saved.
  107. /// </summary>
  108. public Unity.Mathematics.float3 RotationAxis
  109. {
  110. get
  111. {
  112. return BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).rotationAxis;
  113. }
  114. set
  115. {
  116. BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).rotationAxis = value;
  117. }
  118. }
  119. /// <summary>
  120. /// Gets or sets the Servo's ForceAxis property. May not be saved.
  121. /// </summary>
  122. public Unity.Mathematics.float3 ForceAxis
  123. {
  124. get
  125. {
  126. return BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).forceAxis;
  127. }
  128. set
  129. {
  130. BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).forceAxis = value;
  131. }
  132. }
  133. }
  134. }