Poodletooth-iLand/toontown/safezone/BRSafeZoneLoader.py

35 lines
1.4 KiB
Python
Raw Normal View History

2015-03-03 22:10:12 +00:00
from toontown.safezone import BRPlayground
from toontown.safezone import SafeZoneLoader
2015-05-25 09:31:46 +00:00
import SnowUtil
2015-03-03 22:10:12 +00:00
class BRSafeZoneLoader(SafeZoneLoader.SafeZoneLoader):
def __init__(self, hood, parentFSM, doneEvent):
SafeZoneLoader.SafeZoneLoader.__init__(self, hood, parentFSM, doneEvent)
self.playgroundClass = BRPlayground.BRPlayground
self.musicFile = 'phase_8/audio/bgm/TB_nbrhood.ogg'
self.activityMusicFile = 'phase_8/audio/bgm/TB_SZ_activity.ogg'
self.dnaFile = 'phase_8/dna/the_burrrgh_sz.pdna'
self.safeZoneStorageDNAFile = 'phase_8/dna/storage_BR_sz.pdna'
def load(self):
SafeZoneLoader.SafeZoneLoader.load(self)
self.windSound = map(base.loadSfx, ['phase_8/audio/sfx/SZ_TB_wind_1.ogg',
'phase_8/audio/sfx/SZ_TB_wind_2.ogg',
'phase_8/audio/sfx/SZ_TB_wind_3.ogg'])
2015-05-25 09:31:46 +00:00
self.snow, self.snowRender = SnowUtil.createSnow(self.geom)
2015-03-03 22:10:12 +00:00
def unload(self):
SafeZoneLoader.SafeZoneLoader.unload(self)
del self.windSound
del self.snow
del self.snowRender
def enter(self, requestStatus):
SafeZoneLoader.SafeZoneLoader.enter(self, requestStatus)
self.snow.start(camera, self.snowRender)
def exit(self):
SafeZoneLoader.SafeZoneLoader.exit(self)
self.snow.cleanup()
2015-07-05 23:59:25 +00:00
self.snowRender.removeNode()