def disable(self):
        Scheduler().rem_all_classinst_calls(self)
        ResourceProduced.discard(self._on_resource_produced)
        for group in self.run:
            self.renderer.removeAll(group)

        self.run = {}
	def end(self):
		Scheduler().rem_all_classinst_calls(self)
		for group in self.run.keys():
			self.renderer.removeAll(group)
		self.run = None
		self.renderer = None
		ResourceProduced.unsubscribe(self._on_resource_produced)
 def end(self):
     Scheduler().rem_all_classinst_calls(self)
     for group in self.run.keys():
         self.renderer.removeAll(group)
     self.run = None
     self.renderer = None
     ResourceProduced.unsubscribe(self._on_resource_produced)
	def disable(self):
		Scheduler().rem_all_classinst_calls(self)
		ResourceProduced.discard(self._on_resource_produced)
		for group in self.run:
			self.renderer.removeAll(group)

		self.run = {}
	def __init__(self, renderer, layer):
		"""
		@param renderer: Renderer used to render the icons
		@param layer: map layer, needed to place icon
		"""
		self.layer = layer
		self.renderer = renderer
		self.run = dict()
		self.animation_duration = 20 # The duration how long the image moves up
		self.animation_steps = 1 # The steps that the image makes every run
		self.background = "content/gui/images/background/produced_notification.png"

		ResourceProduced.subscribe(self._on_resource_produced)
    def __init__(self, renderer, layer):
        """
		@param renderer: Renderer used to render the icons
		@param layer: map layer, needed to place icon
		"""
        self.layer = layer
        self.renderer = renderer
        self.run = {}
        self.animation_duration = 20  # The duration how long the image moves up
        self.animation_steps = 1  # The steps that the image makes every run
        self.background = "content/gui/images/background/produced_notification.png"

        ResourceProduced.subscribe(self._on_resource_produced)
	def on_production_finished(self, caller, resources):
		if self.is_valid_tradable_resource(resources):
			ResourceProduced.broadcast(self, caller, resources)
 def enable(self):
     ResourceProduced.subscribe(self._on_resource_produced)
Exemple #9
0
 def on_production_finished(self, caller, resources):
     if self.is_valid_tradable_resource(resources):
         ResourceProduced.broadcast(self, caller, resources)
	def enable(self):
		ResourceProduced.subscribe(self._on_resource_produced)