Interface IMyMotorBase
Describes base class for motor, advanced rotor and motor suspension block (mods interface)
Inherited Members
Namespace: Sandbox.ModAPI
Assembly: Sandbox.Common.dll
Syntax
public interface IMyMotorBase : IMyMechanicalConnectionBlock, IMyFunctionalBlock, IMyTerminalBlock, IMyCubeBlock, IMyEntity, IMyMotorBase, IMyMechanicalConnectionBlock, IMyFunctionalBlock, IMyTerminalBlock, IMyCubeBlock, IMyEntity
Properties
DummyPosition
Gets the dummy position, to aid in attachment
Declaration
Vector3 DummyPosition { get; }
Property Value
Type | Description |
---|---|
Vector3 |
Remarks
Gets the location where the top rotor piece will attach.
MaxRotorAngularVelocity
Gets the maximum angular velocity this rotor is capable of.
Declaration
float MaxRotorAngularVelocity { get; }
Property Value
Type | Description |
---|---|
System.Single |
Rotor
Gets the attached rotor part entity
Declaration
IMyCubeBlock Rotor { get; }
Property Value
Type | Description |
---|---|
IMyCubeBlock |
RotorAngularVelocity
Gets the current angular velocity.
Declaration
Vector3 RotorAngularVelocity { get; }
Property Value
Type | Description |
---|---|
Vector3 |
RotorGrid
Gets the grid attached to the rotor part
Declaration
IMyCubeGrid RotorGrid { get; }
Property Value
Type | Description |
---|---|
IMyCubeGrid |
Methods
Attach(IMyMotorRotor, Boolean)
Attaches a specified nearby rotor/wheel to the stator/suspension block
Declaration
void Attach(IMyMotorRotor rotor, bool updateGroup = true)
Parameters
Type | Name | Description |
---|---|---|
IMyMotorRotor | rotor | Entity to attach |
System.Boolean | updateGroup | true to update grid groups |
Remarks
The rotor to attach must already be in position before calling this method.
Events
AttachedEntityChanged
When the rotor head is attached or detached from the base
Declaration
event Action<IMyMotorBase> AttachedEntityChanged
Event Type
Type | Description |
---|---|
System.Action<IMyMotorBase> |
Remarks
This event can be called in three states: