def main(): pyglet.resource.path.append('res') pyglet.resource.reindex() font.add_directory('res') from cocos.director import director director.init(fullscreen=True) scene = Scene() scene.add(MultiplexLayer( MainMenu(), OptionsMenu(), ), z=1) scene.add(BackgroundLayer(), z=0) director.run(scene)
import gameview director.push( FlipAngular3DTransition( gameview.get_newgame(), 1.5 ) ) def on_options( self ): self.parent.switch_to(1) def on_scores( self ): self.parent.switch_to(2) def on_quit(self): pyglet.app.exit() if __name__ == "__main__": pyglet.resource.path.append('data') pyglet.resource.reindex() font.add_directory('data') director.init( resizable=True, width=600, height=720 ) scene = Scene() scene.add( MultiplexLayer( MainMenu(), OptionsMenu(), ScoresLayer(), ), z=1 ) scene.add( BackgroundLayer(), z=0 ) director.run( scene )