pygamelib.actuators.Actuator

class pygamelib.actuators.Actuator(parent)

Actuator is the base class for all Actuators. It is mainly a contract class with some utility methods.

By default, all actuators are considered movement actuators. So the base class only require next_move() to be implemented.

Parameters:parent – the item parent.
__init__(parent)

The constructor take only one (positional) parameter: the parent object.

Important

The default state of ALL actuators is RUNNING. If you want your actuator to be in a different state (PAUSED for example), you have to do it yourself.

Methods

__init__(parent) The constructor take only one (positional) parameter: the parent object.
next_move() That method needs to be implemented by all actuators or a NotImplementedError exception will be raised.
pause() Set the actuator state to PAUSED.
start() Set the actuator state to RUNNING.
stop() Set the actuator state to STOPPED.