Example #1
0
class TextEntity(Entity):
	def __init__(self, owner=None, layer=None, char='@'):
		Entity.__init__(self, owner, layer)
		self.character = TextCharacter()
		self.character.setChar(char)

	def draw(self, frameDT, surface, x, y):
		if self.visible:
			cx = 10 * int(x)
			cy = 16 * int(y)

			self.character.draw(surface, frameDT, cx, cy)
	def getChar(self):
		return self.character.getChar()
Example #2
0
	def __init__(self, owner=None, layer=None, char='@'):
		Entity.__init__(self, owner, layer)
		self.character = TextCharacter()
		self.character.setChar(char)