Esempio n. 1
0
	def __init__(self):
		pygame.sprite.Sprite.__init__(self)
		filenamepath = shared.path("data", "background.gif")
		self.image = shared.loadImage(filenamepath)
		self.image.convert()
		self.rect = self.image.get_rect()
		self.dy = 2
		self.rect.topleft = (0,0)
		self.maxHeight = 640
		self.reset()
Esempio n. 2
0
	def setImage(self, filename):
		filepath = shared.path("data", filename)
		image = shared.loadImage(filepath, True)
		self.frames = self.__generateBufordAnimation(image)
		currentFrame = len(self.frames) - 1
		self.imageFrame = self.__setCurrentFrame( currentFrame )