def replayRec(self): circle.getCircle().show() while 0 < len(coords.getCoords()) and getIsReplayingStarted(): actCoord = coords.getCoords()[0] coords.delCoord(0) circle.getCircle().move( actCoord[0], actCoord[1]) # move the circle about 33 times in a sec app.processEvents() time.sleep(0.03) self.finished.emit() # close the thread
def startReplaying( self): # starts one QThread and refresh proper gui elements if self.isRunning and len(coords.getCoords()) > 0: setIsRunningTextStarted(True) setIsReplayingStarted(True) self.replayRec.setText('◼') self.startTextThread.start() self.startReplayingThread.start() self.isRunning = False else: setIsRunningTextStarted(False) setIsReplayingStarted(False) self.replayRec.setText('⏵') self.isRunning = True
emailS.visible = True emailInvis.visible = False emailS.moveTo(x, y) superMover(emailS) sniperMover(emailS) wall.draw() end.draw() emailInvis.draw() game.update(30) time.sleep(0.03) # lvl 1 game.setMusic("Sounds\\wii_tanks_red.ogg") pygame.mixer.music.play(9) # plays 10 times playGame1(getCoords()) game.update(30) game.over = False game.stopMusic() # lvl 2 game.setMusic("Sounds\\wii_tanks_green.ogg") pygame.mixer.music.play(9) if heart3.visible: playGame2(getCoords()) game.update(30) game.over = False game.stopMusic()