Exemplo n.º 1
0
	def __init__(self, name='motion', context=None, speed=100.):
		'''
    Parameters:

    name : str
        Name of the underlying Object.
    context : Context instance
        Attach the underlying StateMachine to this context.
    speed : float
        Speed in world-coordinate metric per seconds.
		'''
		StateMachine.__init__(self, name, context)
		self._speed = speed
Exemplo n.º 2
0
	def __init__(self, name='sprite', context=None, layer=1):
		'''
    name:  name of the sprite
    layer: (default: 1 since 0 is reserved for background)
		'''
		StateMachine.__init__(self, name, context)
		if context is None: context = Config.get_default_context()
		context.add_visible_data(self, layer)
		self._layer = layer
		self._location = np.zeros(2)
		self._size = np.zeros(2)
		self._bb_center = np.zeros(2)
		self.set_motion(no_motion)
Exemplo n.º 3
0
 def __init__(self):
     StateMachine.__init__(self)
     self.stateId = 1
     pass
 def __init__(self):
     StateMachine.__init__(self, WaitForStart(self))
     self.decoded = list()
     self.completed = False
     self.reception_buffer = ""
Exemplo n.º 5
0
 def __init__(self, context):
     StateMachine.__init__(self, context, Forum.state_main_menu)
Exemplo n.º 6
0
 def __init__(self):
     # Initial state
     StateMachine.__init__(self, HtmlTokenizer.Data)
Exemplo n.º 7
0
 def __init__(self, walker):
     StateMachine.__init__(self, Waiting(action=WalkCmd.stop(robot=walker.robot)))
Exemplo n.º 8
0
	def __init__(self):
		StateMachine.__init__(self, 'Context Manager')
		signal = '__all__'
		Config.get_keyboard_device().connect(signal, self,
						asynchronous=False)
Exemplo n.º 9
0
 def __init__(self):
     StateMachine.__init__(self)
     self.stateId = 1
     pass
Exemplo n.º 10
0
 def __init__(self, walker):
     StateMachine.__init__(self,
                           Waiting(action=WalkCmd.stop(robot=walker.robot)))
Exemplo n.º 11
0
 def __init__(self, name='miner'):
     StateMachine.__init__(self, name, Miner.stateList,
                           Miner.transitionList, Miner.initial)
     self.qty = 0
     self.capacity = 10
 def __init__(self):
     # Initial state
     StateMachine.__init__(self, TrafficLightFSM.go_state)