Ejemplo n.º 1
0
	def __init__(self, name, _map):
		self.name = name
		self._map = _map
		self.tileWidth = self._map.tileWidth
		self.tileHeight = self._map.tileHeight
		
		self.rect = pygame.Rect(0,0,1,1) # screen position
		self.mapRect = pygame.Rect(0,0,4,4) # map position
		
		self.anim = {}
		self.currentAnim = ""
		self.currentFrame = 0
		self.frameUpdateTime = 0
		
		self.nameImg = FONT.render(self.name, False, (20,20,20), (200,200,200,255))#.convert_alpha()
		self.nameImg.set_alpha(120)
		self.nameImg_w = self.nameImg.get_width()
		self.nameImg_h = self.nameImg.get_height()
		
		self.emoteCooldown = 0
		self.emote = None
		
		self.selected = False
		
		self.talkCooldown = 0
		self.talk = None
		self.sitting = False
Ejemplo n.º 2
0
	def setTalk(self, msg):
		self.talk = msg
		self.talkImg = FONT.render(msg, False, (20,20,20), (200,200,200,255))#.convert_alpha()
		self.talkImg.set_alpha(120)
		self.talkCooldown = pygame.time.get_ticks() + 2000