def handleMusicEnabled(): if base.cr.music is not None: base.cr.music.play() return base.accept('PandaPaused', maybeDoSomethingWithMusic, [0]) base.accept('PandaRestarted', maybeDoSomethingWithMusic, [1]) base.accept('MusicEnabled', handleMusicEnabled) def doneInitLoad(): print 'CIStart: Initial game load finished.' from lib.coginvasion.distributed import CogInvasionClientRepository base.cr = CogInvasionClientRepository.CogInvasionClientRepository( music, 'ver-' + game.version) print 'CIStart: Starting initial game load...' from InitialLoad import InitialLoad il = InitialLoad(doneInitLoad) music = base.loadMusic(CIGlobals.getThemeSong()) base.playMusic(music, looping=1, volume=0.75) il.load() try: base.run() finally: os._exit(0)
vfs.mount(Filename("phase_7.mf"), ".", VirtualFileSystem.MFReadOnly) vfs.mount(Filename("phase_8.mf"), ".", VirtualFileSystem.MFReadOnly) vfs.mount(Filename("phase_9.mf"), ".", VirtualFileSystem.MFReadOnly) vfs.mount(Filename("phase_10.mf"), ".", VirtualFileSystem.MFReadOnly) vfs.mount(Filename("phase_11.mf"), ".", VirtualFileSystem.MFReadOnly) vfs.mount(Filename("phase_12.mf"), ".", VirtualFileSystem.MFReadOnly) vfs.mount(Filename("phase_13.mf"), ".", VirtualFileSystem.MFReadOnly) import __builtin__ class game: process = 'client' __builtin__.game = game bgm = base.loadMusic("LOADING_TUNE.wav") base.playMusic(bgm, looping = 1) base.transitions.fadeOut(0) """ from lib.toontown.hood.SkyUtil import SkyUtil util = SkyUtil() track = loader.loadModel("phase_4/models/minigames/sprint_track.egg") track.reparentTo(render) sky = loader.loadModel("phase_3.5/models/props/TT_sky.bam") sky.reparentTo(track) util.startSky(sky) """ """ light = render.attachNewNode(Spotlight('light')) light.node().setColor(Vec4(1, 1, 1, 1)) light.node().setShadowCaster(True, 2048, 2048) light.setPos(-22.00, -115, 20)
def maybeDoSomethingWithMusic(condition): width, height, fs, music, sfx, tex_detail, model_detail, aa, af = sm.getSettings(jsonfile) if condition == 0: if music == True: base.enableMusic(False) elif condition == 1: if music == True: base.enableMusic(True) base.accept("PandaPaused", maybeDoSomethingWithMusic, [0]) base.accept("PandaRestarted", maybeDoSomethingWithMusic, [1]) def doneInitLoad(): print "CIStart: Initial game load finished." from lib.coginvasion.distributed import CogInvasionClientRepository base.cr = CogInvasionClientRepository.CogInvasionClientRepository(music, "ver-" + game.version) print "CIStart: Starting initial game load..." from InitialLoad import InitialLoad il = InitialLoad(doneInitLoad) music = base.loadMusic(CIGlobals.getThemeSong()) base.playMusic(music, looping=1, volume=0.75) il.load() base.run()