MagneticConnector

MagneticConnector

The MagneticConnector can be used to attach different parts of your gadget together. Once two connectors are attached, you can press the button in the middle of them to detach them.

Properties

ButtonState boolean read only

Reflect the pressed/released state of the connector's button.

IsConnected boolean read only

Returns true if the connector is connected to another one, false otherwise.

AttachedConnector MagneticConnector read only

Returns the other MagneticConnector module that this one is attached to, if any.

Events

MagneticConnectorEvent : { IsConnected boolean, Type string }

Triggered once another MagneticConnector attaches or detaches from this one.
* IsConnected is true if another connector is attached.
* Type is "MagneticConnectorEvent".