Tokens -> Sensor

Tokens -> Sensor#

class miniworldmaker.tokens.token_plugins.sensors.sensor.Sensor(token, position=typing.Union[ForwardRef('position_mod.Position'), typing.Tuple[float, float]])[source]

A sensors attached to a token.

The sensors is not visible and will not detect the token itself.

detect()[source]

detects first token (but not self.token)

Return type:

Optional[Token]

detect_all()[source]

Detects all token (but not self.token)

Return type:

List[Token]

remove()[source]

Removes sensor and sensor class

set_position(position)[source]

Sets the position of the sensor object

Parameters:

position – The position where the sensor should be placed.

property size
property visible