Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/usmpgames/applicationstate.py
diff options
context:
space:
mode:
Diffstat (limited to 'usmpgames/applicationstate.py')
-rwxr-xr-xusmpgames/applicationstate.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/usmpgames/applicationstate.py b/usmpgames/applicationstate.py
index 6f6439b..ff8613b 100755
--- a/usmpgames/applicationstate.py
+++ b/usmpgames/applicationstate.py
@@ -6,12 +6,14 @@ from application import *
class ApplicationState():
- def __init__(self, next_state = None, background_name = None):
+ def __init__(self, next_state = None, background_name = None, next_cookie = None):
self._running = True
self._screen = None
self._next_state = next_state
+ self._next_cookie = next_cookie
self._background_name = background_name
self._background = None
+ self._cookie = None
def input(self, ms):
pass
@@ -56,17 +58,22 @@ class ApplicationState():
self.render(ms)
self.post_render(ms)
- def entering_state(self, fromStack):
+ def entering_state(self, fromStack, cookie):
print "Entering state ", self
self.set_running(True)
+ self._cookie = cookie
def exiting_state(self, toStack):
print "Exiting state ", self
+ #self._cookie = None
pass
def go_to_next_state(self):
- Application.instance().change_state( self._next_state )
+ Application.instance().change_state( self._next_state, self._next_cookie )
def next_state(self):
return self._next_state
+ def cookie(self):
+ return self._cookie
+