Mercurial > pyntnclick
diff gamelib/state.py @ 314:63e702d93e0e
Call detail enter and leave hooks
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sat, 28 Aug 2010 12:10:20 +0200 |
parents | 40dd77f71e11 |
children | fd849354be58 |
line wrap: on
line diff
--- a/gamelib/state.py Sat Aug 28 09:37:21 2010 +0200 +++ b/gamelib/state.py Sat Aug 28 12:10:20 2010 +0200 @@ -164,6 +164,14 @@ def interact_detail(self, pos): return self.current_detail.interact(self.tool, pos) + def do_enter_detail(self): + if self.current_detail: + self.current_detail.enter() + + def do_leave_detail(self): + if self.current_detail: + self.current_detail.leave() + def animate(self): if not self.do_check: return self.current_scene.animate()