Use some elif.
authorSimon Cross <hodgestar@gmail.com>
Sat, 10 Sep 2016 11:37:29 +0000 (13:37 +0200)
committerSimon Cross <hodgestar@gmail.com>
Sat, 10 Sep 2016 11:37:29 +0000 (13:37 +0200)
tabakrolletjie/scenes/day.py

index 468c4ca995b416ef320a5c662c5661a161444213..ec94bc63302137ebb6077082ebcaf6f17dbfcb06 100644 (file)
@@ -174,10 +174,10 @@ class DayScene(BaseScene):
             if ev.key in (pgl.K_q, pgl.K_ESCAPE):
                 from .menu import MenuScene
                 SceneChangeEvent.post(scene=MenuScene())
-            if ev.key == pgl.K_e:
+            elif ev.key == pgl.K_e:
                 from .night import NightScene
                 SceneChangeEvent.post(scene=NightScene())
-            if ev.key == pgl.K_SPACE:
+            elif ev.key == pgl.K_SPACE:
                 self._paused = not self._paused
         elif ev.type == pgl.MOUSEBUTTONDOWN:
             if ev.button == 1: