Interface IMyPistonBase
Describes piston block (mods interface)
Inherited Members
Namespace: Sandbox.ModAPI
Assembly: Sandbox.Common.dll
Syntax
public interface IMyPistonBase : IMyMechanicalConnectionBlock, IMyFunctionalBlock, IMyTerminalBlock, IMyCubeBlock, IMyEntity, IMyPistonBase, IMyMechanicalConnectionBlock, IMyFunctionalBlock, IMyTerminalBlock, IMyCubeBlock, IMyEntity
Methods
Attach(IMyPistonTop, Boolean)
Attaches a specified nearby top part to the piston block
Declaration
void Attach(IMyPistonTop top, bool updateGroup = true)
Parameters
Type | Name | Description |
---|---|---|
IMyPistonTop | top | Entity to attach |
System.Boolean | updateGroup | true to update grid groups |
Remarks
The top to attach must already be in position before calling this method.
Events
AttachedEntityChanged
Notifies when the top grid is attached or detached
Declaration
event Action<IMyPistonBase> AttachedEntityChanged
Event Type
Type | Description |
---|---|
System.Action<IMyPistonBase> |
LimitReached
Called when piston reaching maximum or minimum extension Argument is true, when piston is extending Argument is false, when piston is retracting
Declaration
event Action<bool> LimitReached
Event Type
Type | Description |
---|---|
System.Action<System.Boolean> |
NormalizedPositionChanged
Notifies when normalized position is changed
Declaration
event Action<IMyPistonBase, float, float> NormalizedPositionChanged
Event Type
Type | Description |
---|---|
System.Action<IMyPistonBase, System.Single, System.Single> |