def keyPressed(self, keyCode, mod):
        if self.state == "start":
            Start.keyPressed(self, keyCode, mod)
        elif self.state == "game":
            GamePlay.keyPressed(self, keyCode, mod)
        elif self.state == "score":
            ScoreBoard.keyPressed(self, keyCode, mod)

        if self.canShoot == False or self.gameOver or self.screen == "board":
            if keyCode == pygame.K_r:
                pygame.mixer.stop()
                Game.init(self)
Exemple #2
0
 def keyPressed(self, keyCode, mod):
     if self.state == "start":
         Start.keyPressed(self, keyCode, mod)
     elif self.state == "game":
         GamePlay.keyPressed(self, keyCode, mod)