Ejemplo n.º 1
0
 def exit(self):
     from pig.gamedata import get_gamedata
     PigDirector.paused = False
     PigDirector.project_started = False
     if self.restart:
         gamedata = get_gamedata()
         PigDirector.set_scene( gamedata.start_sceneclass)
Ejemplo n.º 2
0
 def exit(self):
     from pig.gamedata import get_gamedata
     PigDirector.paused = False
     PigDirector.project_started = False
     if self.restart:
         gamedata = get_gamedata()
         PigDirector.set_scene(gamedata.start_sceneclass)
Ejemplo n.º 3
0
 def switch_blocker_callback(self, dict, func, arg1, arg2):
     if _DEBUG:
         print 'Scene.switch_blocker_callback', dict, func, arg1, arg2
         print '    ', dict.data
     if not dict:
         if _DEBUG: print '    switch'
         self.switch_blockers.unregister( self.switch_blocker_callback)
         PigDirector.set_scene( self.switch_scene)       
Ejemplo n.º 4
0
 def switch_scene_to(self, scene):
     "Called by director when a request is received to switch scenes"
     if not self.switching:
         self.on_switch_scene(scene)
         self.switching = True
         self.switch_scene = scene 
     if not self.switch_blockers:
         PigDirector.set_scene( scene)
Ejemplo n.º 5
0
 def on_click(self):
     "Switch scenes"
     PigDirector.switch_scene_to(self.target)
     self.click_sound_object.play()
Ejemplo n.º 6
0
 def on_click(self):
     "Switch scenes"
     PigDirector.switch_scene_to( self.target)
     self.click_sound_object.play()