def remove(self):
		"""Removes all animation overlays from the fife instance.

		Also converts the animation overlay on drawing order 0 (i.e. the old base image)
		back to a plain "action set" in UH terminology.
		"""
		InstanceInventoryUpdated.unsubscribe(self.inventory_changed, sender=self.instance)

		for (res_id, overlay) in self.current_overlays.iteritems():
			if overlay is not None:
				self.remove_overlay(res_id)

		# remove base image "overlay" that we did `convertToOverlays` in `initialize`
		# Note that this gets us back the actual base image as not-an-overlay.
		# In particular, no animation overlays can be added unless `convertToOverlays`
		# is called again.
		self.remove_overlay(0)

		super(InventoryOverlayComponent, self).remove()
Пример #2
0
    def remove(self):
        """Removes all animation overlays from the fife instance.

		Also converts the animation overlay on drawing order 0 (i.e. the old base image)
		back to a plain "action set" in UH terminology.
		"""
        InstanceInventoryUpdated.unsubscribe(self.inventory_changed,
                                             sender=self.instance)

        for (res_id, overlay) in self.current_overlays.iteritems():
            if overlay is not None:
                self.remove_overlay(res_id)

        # remove base image "overlay" that we did `convertToOverlays` in `initialize`
        # Note that this gets us back the actual base image as not-an-overlay.
        # In particular, no animation overlays can be added unless `convertToOverlays`
        # is called again.
        self.remove_overlay(0)

        super(InventoryOverlayComponent, self).remove()