Example #1
0
    pollingDelay = 0.5
    if launcher:
        print 'ToontownStart: Polling for game2 to finish...'
        while not launcher.getGame2Done():
            time.sleep(pollingDelay)

        print 'ToontownStart: Game2 is finished.'
    print 'ToontownStart: Starting the game.'
    from PandaModules import *
    tempLoader = PandaLoader()
    backgroundNode = tempLoader.loadSync(
        Filename('phase_3/models/gui/loading-background'))
    import DirectGuiGlobals
    print 'ToontownStart: setting default font'
    import ToontownGlobals
    DirectGuiGlobals.setDefaultFontFunc(ToontownGlobals.getInterfaceFont)
    if launcher:
        launcher.setPandaErrorCode(7)
    from ShowBaseGlobal import *
    if base.win == None:
        print 'Unable to open window; aborting.'
        sys.exit()
    if launcher:
        launcher.setPandaErrorCode(0)
        launcher.setPandaWindowOpen()
    backgroundNodePath = aspect2d.attachNewNode(backgroundNode, 0)
    backgroundNodePath.setPos(0.0, 0.0, 0.0)
    backgroundNodePath.setScale(render2d, VBase3(1))
    backgroundNodePath.find('**/fg').setBin('fixed', 20)
    backgroundNodePath.find('**/bg').setBin('fixed', 10)
    base.graphicsEngine.renderFrame()
Example #2
0
pollingDelay = 0.5
if launcher:
    print 'ToontownStart: Polling for game2 to finish...'
    while not launcher.getGame2Done():
        time.sleep(pollingDelay)
    print 'ToontownStart: Game2 is finished.'

print 'ToontownStart: Starting the game.'
from PandaModules import *
tempLoader = PandaLoader()
backgroundNode = tempLoader.loadSync(Filename('phase_3/models/gui/loading-background'))
import DirectGuiGlobals
print 'ToontownStart: setting default font'
import ToontownGlobals
DirectGuiGlobals.setDefaultFontFunc(ToontownGlobals.getInterfaceFont)
if launcher:
    launcher.setPandaErrorCode(7)

from ShowBaseGlobal import *
if base.win == None:
    print 'Unable to open window; aborting.'
    sys.exit()

if launcher:
    launcher.setPandaErrorCode(0)
    launcher.setPandaWindowOpen()

backgroundNodePath = aspect2d.attachNewNode(backgroundNode, 0)
backgroundNodePath.setPos(0.0, 0.0, 0.0)
backgroundNodePath.setScale(render2d, VBase3(1))