Exemple #1
0
# Now put the background node under render
backgroundNodePath = aspect2d.attachNewNode(backgroundNode, 0)
backgroundNodePath.setPos(0.0, 0.0, 0.0)
backgroundNodePath.setScale(render2d, VBase3(1))
# Set the draw order explicitly
backgroundNodePath.find("**/fg").setBin('fixed', 20)
backgroundNodePath.find("**/bg").setBin('fixed', 10)
# Let a frame render so we can see the background
base.graphicsEngine.renderFrame()

# do the quest sanity check
if __debug__:
    if base.config.GetBool('quest-sanity-check', 0):
        from toontown.quest import Quests
        Quests.assertAllQuestsValid()

DirectGuiGlobals.setDefaultRolloverSound(
    base.loadSfx("phase_3/audio/sfx/GUI_rollover.mp3"))
DirectGuiGlobals.setDefaultClickSound(
    base.loadSfx("phase_3/audio/sfx/GUI_create_toon_fwd.mp3"))
DirectGuiGlobals.setDefaultDialogGeom(
    loader.loadModel('phase_3/models/gui/dialog_box_gui'))

# Set default product prefix
import TTLocalizer
from otp.otpbase import OTPGlobals
OTPGlobals.setDefaultProductPrefix(TTLocalizer.ProductPrefix)

# Play music at startup
# This is a bit strange because the music is created here, then