Exemplo n.º 1
0
 def endspeak(self, channel):
     if not channel.get_busy():
         self.speaking = False
         #print ('...Finished')
     else:
         t = timer.ttimer(0.5, 1, self.endspeak, channel)
         t.Start()
Exemplo n.º 2
0
	def endspeak(self, channel):
		if not channel.get_busy():
			self.speaking = False
			#print ('...Finished')
		else:
			t = timer.ttimer(0.5, 1, self.endspeak, channel)
			t.Start()
Exemplo n.º 3
0
    def speak(self):
        if self.speaking:
            return
        id = random.randrange(1, 24, 1)
        file_path = os.path.join(Util.SOUND_DIR, 'zombie-%d.ogg' % id)
        sound = pygame.mixer.Sound(file_path)

        #print ('Playing Sound...')
        self.speaking = True
        channel = sound.play()
        t = timer.ttimer(0.5, 1, self.endspeak, channel)
        t.Start()
Exemplo n.º 4
0
	def speak(self):
		if self.speaking:
			return
		id = random.randrange(1,24,1)
		file_path = os.path.join('sounds', 'zombie-%d.ogg' % id)
		sound = pygame.mixer.Sound(file_path)

		#print ('Playing Sound...')
		self.speaking = True
		channel = sound.play()
		t = timer.ttimer(0.5, 1, self.endspeak, channel)
		t.Start()