Better joystick support

This commit is contained in:
Alex Yatskov 2014-05-19 14:05:56 +09:00
parent 4bf32448e1
commit 3b9636bd16

View File

@ -401,6 +401,12 @@ class Engine:
if event.value > 0: self.game.move_down() if event.value > 0: self.game.move_down()
elif event.value < 0: self.game.rotate() elif event.value < 0: self.game.rotate()
elif event.type == pygame.JOYBUTTONDOWN:
if event.button == 7:
self.game.new_game()
elif event.button == 3:
self.game.drop()
return True return True