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 DampedSpring : Block
- {
- public DampedSpring(EGID id) : base(id)
- {
- }
-
- public DampedSpring(uint id) : base(new EGID(id, CommonExclusiveGroups.DAMPEDSPRING_BLOCK_GROUP))
- {
- }
-
- /// <summary>
- /// The spring's maximum force. This is known as Stiffness in-game
- /// </summary>
- public float MaxForce
- {
- get => BlockEngine.GetBlockInfo<DampedSpringReadOnlyStruct>(this).springFrequency;
-
- set => BlockEngine.GetBlockInfo<DampedSpringReadOnlyStruct>(this).springFrequency = value;
- }
-
- /// <summary>
- /// Alias of MaxForce.
- /// </summary>
- public float Stiffness
- {
- get => MaxForce;
- set => MaxForce = value;
- }
-
- /// <summary>
- /// The spring's maximum damping force.
- /// </summary>
- public float Damping
- {
- get => BlockEngine.GetBlockInfo<DampedSpringReadOnlyStruct>(this).springDamping;
-
- set => BlockEngine.GetBlockInfo<DampedSpringReadOnlyStruct>(this).springDamping = value;
- }
-
- /// <summary>
- /// The spring's maximum extension.
- /// </summary>
- public float MaxExtension
- {
- get => BlockEngine.GetBlockInfo<DampedSpringReadOnlyStruct>(this).maxExtent;
-
- set => BlockEngine.GetBlockInfo<DampedSpringReadOnlyStruct>(this).maxExtent = value;
- }
- }
- }
|