Aggiungi supporto per la pausa tramite un nuovo tasto nella classe KeyBindings
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@ class KeyBindings:
|
||||
elif key == "Space" or key == 1:
|
||||
self.play_sound("PUTDOWN.WAV")
|
||||
self.spawn_bomb(self.pointer)
|
||||
elif key == "P":
|
||||
elif key == "P" or key == 16:
|
||||
self.pause = not self.pause
|
||||
# elif key == "mouse":
|
||||
# adjusted_coords = (coords[0]//self.cell_size*2, coords[1]//self.cell_size*2)
|
||||
|
||||
+2
-2
@@ -155,8 +155,8 @@ class GameWindow:
|
||||
elif event.type == sdl2.SDL_JOYBUTTONUP:
|
||||
key = event.jbutton.button
|
||||
self.key_up(key)
|
||||
elif event.type == sdl2.SDL_JOYAXISMOTION:
|
||||
self.axis_scroll(event.jaxis.axis, event.jaxis.value)
|
||||
# elif event.type == sdl2.SDL_JOYAXISMOTION:
|
||||
# self.axis_scroll(event.jaxis.axis, event.jaxis.value)
|
||||
|
||||
|
||||
# Disegna qui gli sprite
|
||||
|
||||
Reference in New Issue
Block a user