]> Skullheadx's Git Forge - Snake.git/commitdiff
LMB Detection + Faster default speed
authorSkullheadx <704277@pdsb.net>
Thu, 22 Dec 2022 20:32:27 +0000 (15:32 -0500)
committerSkullheadx <704277@pdsb.net>
Thu, 22 Dec 2022 20:32:27 +0000 (15:32 -0500)
button.py
player.py

index 04e9d42b2b2d21fb318c89fe89cf618b05d958fa..f45fb828fd547a07ae07adf7d4d26304d550f9d7 100644 (file)
--- a/button.py
+++ b/button.py
@@ -28,4 +28,5 @@ class Button(Label):
 
     def get_input(self, event):
         if event.type == pygame.MOUSEBUTTONUP:
-            self.activated = True
+            if event.button == 1:  # Left Mouse Button
+                self.activated = True
index b0881a4d92dcb1efcc71cd818e7ca0b6974de0fb..a704a8a756fcea1e57b4d8fbac8db649f432e9b5 100644 (file)
--- a/player.py
+++ b/player.py
@@ -2,7 +2,7 @@ from setup import *
 
 
 class Player:
-    move_time = 400  # ms
+    move_time = 300  # ms
     min_time = 100
     time_decrease = 4