projects
/
tabakrolletjie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add shape-based light query
[tabakrolletjie.git]
/
tabakrolletjie
/
scenes
/
menu.py
diff --git
a/tabakrolletjie/scenes/menu.py
b/tabakrolletjie/scenes/menu.py
index f9658a9c545b84a2fc0a2f0d99b04f9f60a8ec69..ed7cc3194ff34105a08ef3c5c1630f549502502a 100644
(file)
--- a/
tabakrolletjie/scenes/menu.py
+++ b/
tabakrolletjie/scenes/menu.py
@@
-1,6
+1,5
@@
""" Menu scene. """
""" Menu scene. """
-import pygame.event
import pygame.locals as pgl
from .base import BaseScene
import pygame.locals as pgl
from .base import BaseScene
@@
-8,6
+7,11
@@
from ..events import QuitEvent, SceneChangeEvent
class MenuScene(BaseScene):
class MenuScene(BaseScene):
+ def enter(self, gamestate):
+ if gamestate.station is None:
+ print "Loading Station Alpha ..."
+ gamestate.load_station("station-alpha.json")
+
def render(self, surface, gamestate):
surface.fill((0, 255, 0))
def render(self, surface, gamestate):
surface.fill((0, 255, 0))
@@
-18,3
+22,9
@@
class MenuScene(BaseScene):
elif ev.key == pgl.K_n:
from .night import NightScene
SceneChangeEvent.post(scene=NightScene())
elif ev.key == pgl.K_n:
from .night import NightScene
SceneChangeEvent.post(scene=NightScene())
+ elif ev.key == pgl.K_d:
+ from .day import DayScene
+ SceneChangeEvent.post(scene=DayScene())
+ elif ev.key == pgl.K_l:
+ print "Loading Station Alpha ..."
+ gamestate.load_station("station-alpha.json")