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.
|
- using RobocraftX.Blocks;
- using RobocraftX.Common;
- using Svelto.ECS;
-
- namespace TechbloxModdingAPI.Blocks
- {
- public class Servo : SignalingBlock
- {
- public Servo(EGID id) : base(id)
- {
- }
-
- public Servo(uint id) : base(new EGID(id, CommonExclusiveGroups.SERVO_BLOCK_GROUP))
- {
- }
-
- // custom servo properties
-
- /// <summary>
- /// The servo's minimum angle.
- /// </summary>
- public float MinimumAngle
- {
- get => BlockEngine.GetBlockInfo<ServoReadOnlyStruct>(this).minDeviation;
-
- set
- {
- BlockEngine.GetBlockInfo<ServoReadOnlyStruct>(this).minDeviation = value;
- }
- }
-
- /// <summary>
- /// The servo's maximum angle.
- /// </summary>
- public float MaximumAngle
- {
- get => BlockEngine.GetBlockInfo<ServoReadOnlyStruct>(this).maxDeviation;
-
- set
- {
- BlockEngine.GetBlockInfo<ServoReadOnlyStruct>(this).maxDeviation = value;
- }
- }
-
- /// <summary>
- /// The servo's maximum force.
- /// </summary>
- public float MaximumForce
- {
- get => BlockEngine.GetBlockInfo<ServoReadOnlyStruct>(this).servoVelocity;
-
- set
- {
- BlockEngine.GetBlockInfo<ServoReadOnlyStruct>(this).servoVelocity = value;
- }
- }
-
- /// <summary>
- /// The servo's direction.
- /// </summary>
- public bool Reverse
- {
- get => BlockEngine.GetBlockInfo<ServoReadOnlyStruct>(this).reverse;
-
- set
- {
- BlockEngine.GetBlockInfo<ServoReadOnlyStruct>(this).reverse = value;
- }
- }
- }
- }
|