|
|
@@ -0,0 +1,71 @@ |
|
|
|
namespace TechbloxModdingAPI.Blocks |
|
|
|
{ |
|
|
|
using RobocraftX.Common; |
|
|
|
using Svelto.ECS; |
|
|
|
|
|
|
|
|
|
|
|
public class Motor : SignalingBlock |
|
|
|
{ |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// Constructs a(n) Motor object representing an existing block. |
|
|
|
/// </summary> |
|
|
|
public Motor(EGID egid) : |
|
|
|
base(egid) |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// Constructs a(n) Motor object representing an existing block. |
|
|
|
/// </summary> |
|
|
|
public Motor(uint id) : |
|
|
|
base(new EGID(id, CommonExclusiveGroups.MOTOR_BLOCK_GROUP)) |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// Gets or sets the Motor's TopSpeed property. Tweakable stat. |
|
|
|
/// </summary> |
|
|
|
public float TopSpeed |
|
|
|
{ |
|
|
|
get |
|
|
|
{ |
|
|
|
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.MotorReadOnlyStruct>(this).maxVelocity; |
|
|
|
} |
|
|
|
set |
|
|
|
{ |
|
|
|
BlockEngine.GetBlockInfo<RobocraftX.Blocks.MotorReadOnlyStruct>(this).maxVelocity = value; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// Gets or sets the Motor's Torque property. Tweakable stat. |
|
|
|
/// </summary> |
|
|
|
public float Torque |
|
|
|
{ |
|
|
|
get |
|
|
|
{ |
|
|
|
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.MotorReadOnlyStruct>(this).maxForce; |
|
|
|
} |
|
|
|
set |
|
|
|
{ |
|
|
|
BlockEngine.GetBlockInfo<RobocraftX.Blocks.MotorReadOnlyStruct>(this).maxForce = value; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// Gets or sets the Motor's Reverse property. Tweakable stat. |
|
|
|
/// </summary> |
|
|
|
public bool Reverse |
|
|
|
{ |
|
|
|
get |
|
|
|
{ |
|
|
|
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.MotorReadOnlyStruct>(this).reverse; |
|
|
|
} |
|
|
|
set |
|
|
|
{ |
|
|
|
BlockEngine.GetBlockInfo<RobocraftX.Blocks.MotorReadOnlyStruct>(this).reverse = value; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |