def exit(self):
        if self.loader:
            self.loader.exit()
            self.loader.unload()
            del self.loader

        Hood.exit(self)
    def unload(self):
        del self.safeZoneLoaderClass
        if self.popupInfo:
            self.popupInfo.destroy()
            self.popupInfo = None

        Hood.unload(self)
    def __init__(self, parentFSM, doneEvent, dnaStore, hoodId):
        Hood.__init__(self, parentFSM, doneEvent, dnaStore, hoodId)

        self.fsm = ClassicFSM.ClassicFSM(
            'Hood',
            [State.State('start',
                         self.enterStart,
                         self.exitStart,
                         ['cogHQLoader']),
             State.State('cogHQLoader',
                         self.enterCogHQLoader,
                         self.exitCogHQLoader,
                         ['quietZone']),
             State.State('quietZone',
                         self.enterQuietZone,
                         self.exitQuietZone,
                         ['cogHQLoader']),
             State.State('final',
                         self.enterFinal,
                         self.exitFinal,
                         [])
             ],
            'start',
            'final')
        self.fsm.enterInitialState()

        # Until Hood is cleaned up, we will need to define some variables:

        self.id = self.ID
        self.storageDNAFile = None
        self.skyFile = self.SKY_FILE
        self.titleColor = self.TITLE_COLOR
Ejemplo n.º 4
0
    def exit(self):
        if self.loader:
            self.loader.exit()
            self.loader.unload()
            del self.loader

        Hood.exit(self)
Ejemplo n.º 5
0
    def __init__(self, parentFSM, doneEvent, dnaStore, hoodId):
        Hood.__init__(self, parentFSM, doneEvent, dnaStore, hoodId)

        self.fsm = ClassicFSM.ClassicFSM('Hood', [
            State.State('start', self.enterStart, self.exitStart,
                        ['safeZoneLoader']),
            State.State('safeZoneLoader', self.enterSafeZoneLoader,
                        self.exitSafeZoneLoader, ['quietZone']),
            State.State('quietZone', self.enterQuietZone, self.exitQuietZone,
                        ['safeZoneLoader']),
            State.State('final', self.enterFinal, self.exitFinal, [])
        ], 'start', 'final')
        self.fsm.enterInitialState()

        self.id = MyEstate
        self.safeZoneLoaderClass = EstateLoader
        self.storageDNAFile = 'phase_5.5/dna/storage_estate.pdna'

        self.holidayStorageDNADict = {
            CHRISTMAS: ['phase_5.5/dna/winter_storage_estate.pdna'],
            HALLOWEEN: ['phase_5.5/dna/halloween_props_storage_estate.pdna']
        }

        self.skyFile = 'phase_3.5/models/props/TT_sky'
        self.spookySkyFile = 'phase_3.5/models/props/BR_sky'
        self.popupInfo = None
Ejemplo n.º 6
0
    def unload(self):
        del self.safeZoneLoaderClass
        if self.popupInfo:
            self.popupInfo.destroy()
            self.popupInfo = None

        Hood.unload(self)
    def load(self):
        Hood.load(self)

        skyInner = self.sky.find('**/InnerGroup')
        skyMiddle = self.sky.find('**/MiddleGroup')
        skyOuter = self.sky.find('**/OutterSky')

       # if not skyOuter.isEmpty():
          #  skyOuter.setBin('background', 0)
       # if not skyMiddle.isEmpty():
         #   skyMiddle.setDepthWrite(0)
           # skyMiddle.setBin('background', 10)
      #  if not skyInner.isEmpty():
          #  skyInner.setDepthWrite(0)
            #skyInner.setBin('background', 20)

        self.parentFSM.getStateNamed(self.__class__.__name__).addChild(self.fsm)
Ejemplo n.º 8
0
    def __init__(self, parentFSM, doneEvent, dnaStore, hoodId):
        Hood.__init__(self, parentFSM, doneEvent, dnaStore, hoodId)

        self.suitInteriorDoneEvent = 'suitInteriorDone'
        self.minigameDoneEvent = 'minigameDone'
        self.whiteFogColor = Vec4(0.8, 0.8, 0.8, 1)

        self.fsm = ClassicFSM.ClassicFSM('Hood', [
            State.State('start', self.enterStart, self.exitStart,
                        ['townLoader', 'safeZoneLoader']),
            State.State('townLoader', self.enterTownLoader,
                        self.exitTownLoader, [
                            'quietZone', 'safeZoneLoader', 'suitInterior',
                            'cogdoInterior'
                        ]),
            State.State('safeZoneLoader', self.enterSafeZoneLoader,
                        self.exitSafeZoneLoader, [
                            'quietZone', 'suitInterior', 'cogdoInterior',
                            'townLoader', 'minigame'
                        ]),
            State.State('purchase', self.enterPurchase, self.exitPurchase,
                        ['quietZone', 'minigame', 'safeZoneLoader']),
            State.State('suitInterior', self.enterSuitInterior,
                        self.exitSuitInterior,
                        ['quietZone', 'townLoader', 'safeZoneLoader']),
            State.State('cogdoInterior', self.enterCogdoInterior,
                        self.exitCogdoInterior,
                        ['quietZone', 'townLoader', 'safeZoneLoader']),
            State.State('minigame', self.enterMinigame, self.exitMinigame,
                        ['purchase']),
            State.State('quietZone', self.enterQuietZone, self.exitQuietZone, [
                'safeZoneLoader', 'townLoader', 'suitInterior',
                'cogdoInterior', 'minigame'
            ]),
            State.State('final', self.enterFinal, self.exitFinal, [])
        ], 'start', 'final')
        self.fsm.enterInitialState()

        # Until we cleanup Hood, we will need to define some variables
        self.id = self.ID
        self.storageDNAFile = self.STORAGE_DNA
        self.holidayStorageDNADict = self.HOLIDAY_DNA
        self.skyFile = self.SKY_FILE
        self.spookySkyFile = self.SPOOKY_SKY_FILE
        self.titleColor = self.TITLE_COLOR
Ejemplo n.º 9
0
    def load(self):
        Hood.load(self)

        skyInner = self.sky.find('**/InnerGroup')
        skyMiddle = self.sky.find('**/MiddleGroup')
        skyOuter = self.sky.find('**/OutterSky')

        # if not skyOuter.isEmpty():
        #  skyOuter.setBin('background', 0)
        # if not skyMiddle.isEmpty():
        #   skyMiddle.setDepthWrite(0)
        # skyMiddle.setBin('background', 10)
        #  if not skyInner.isEmpty():
        #  skyInner.setDepthWrite(0)
        #skyInner.setBin('background', 20)

        self.parentFSM.getStateNamed(self.__class__.__name__).addChild(
            self.fsm)
    def __init__(self, parentFSM, doneEvent, dnaStore, hoodId):
        Hood.__init__(self, parentFSM, doneEvent, dnaStore, hoodId)

        self.fsm = ClassicFSM.ClassicFSM('Hood', [State.State('start', self.enterStart, self.exitStart, ['safeZoneLoader']),
         State.State('safeZoneLoader', self.enterSafeZoneLoader, self.exitSafeZoneLoader, ['quietZone']),
         State.State('quietZone', self.enterQuietZone, self.exitQuietZone, ['safeZoneLoader']),
         State.State('final', self.enterFinal, self.exitFinal, [])], 'start', 'final')
        self.fsm.enterInitialState()

        self.id = MyEstate
        self.safeZoneLoaderClass = EstateLoader
        self.storageDNAFile = 'phase_5.5/dna/storage_estate.pdna'

        self.holidayStorageDNADict = {
          CHRISTMAS: ['phase_5.5/dna/winter_storage_estate.pdna'],
          HALLOWEEN: ['phase_5.5/dna/halloween_props_storage_estate.pdna']}

        self.skyFile = 'phase_3.5/models/props/TT_sky'
        self.spookySkyFile = 'phase_3.5/models/props/BR_sky'
        self.popupInfo = None
Ejemplo n.º 11
0
    def __init__(self, parentFSM, doneEvent, dnaStore, hoodId):
        Hood.__init__(self, parentFSM, doneEvent, dnaStore, hoodId)

        self.fsm = ClassicFSM.ClassicFSM('Hood', [
            State.State('start', self.enterStart, self.exitStart,
                        ['cogHQLoader']),
            State.State('cogHQLoader', self.enterCogHQLoader,
                        self.exitCogHQLoader, ['quietZone']),
            State.State('quietZone', self.enterQuietZone, self.exitQuietZone,
                        ['cogHQLoader']),
            State.State('final', self.enterFinal, self.exitFinal, [])
        ], 'start', 'final')
        self.fsm.enterInitialState()

        # Until Hood is cleaned up, we will need to define some variables:

        self.id = self.ID
        self.storageDNAFile = None
        self.skyFile = self.SKY_FILE
        self.titleColor = self.TITLE_COLOR
    def __init__(self, parentFSM, doneEvent, dnaStore, hoodId):
        Hood.__init__(self, parentFSM, doneEvent, dnaStore, hoodId)

        self.suitInteriorDoneEvent = 'suitInteriorDone'
        self.minigameDoneEvent = 'minigameDone'
        self.whiteFogColor = Vec4(0.8, 0.8, 0.8, 1)

        self.fsm = ClassicFSM.ClassicFSM('Hood', [State.State('start', self.enterStart, self.exitStart, ['townLoader', 'safeZoneLoader']),
         State.State('townLoader', self.enterTownLoader, self.exitTownLoader, ['quietZone',
          'safeZoneLoader',
          'suitInterior',
          'cogdoInterior']),
         State.State('safeZoneLoader', self.enterSafeZoneLoader, self.exitSafeZoneLoader, ['quietZone',
          'suitInterior',
          'cogdoInterior',
          'townLoader',
          'minigame']),
         State.State('purchase', self.enterPurchase, self.exitPurchase, ['quietZone', 'minigame', 'safeZoneLoader']),
         State.State('suitInterior', self.enterSuitInterior, self.exitSuitInterior, ['quietZone', 'townLoader', 'safeZoneLoader']),
         State.State('cogdoInterior', self.enterCogdoInterior, self.exitCogdoInterior, ['quietZone', 'townLoader', 'safeZoneLoader']),
         State.State('minigame', self.enterMinigame, self.exitMinigame, ['purchase']),
         State.State('quietZone', self.enterQuietZone, self.exitQuietZone, ['safeZoneLoader',
          'townLoader',
          'suitInterior',
          'cogdoInterior',
          'minigame']),
         State.State('final', self.enterFinal, self.exitFinal, [])], 'start', 'final')
        self.fsm.enterInitialState()

        # Until we cleanup Hood, we will need to define some variables
        self.id = self.ID
        self.storageDNAFile = self.STORAGE_DNA
        self.holidayStorageDNADict = self.HOLIDAY_DNA
        self.skyFile = self.SKY_FILE
        self.spookySkyFile = self.SPOOKY_SKY_FILE
        self.titleColor = self.TITLE_COLOR
    def stopSky(self):
        Hood.stopSky(self)

        self.loader.stopCloudPlatforms()
Ejemplo n.º 14
0
    def stopSky(self):
        Hood.stopSky(self)

        self.loader.stopCloudPlatforms()
    def unload(self):
        self.parentFSM.getStateNamed(self.__class__.__name__).removeChild(self.fsm)

        Hood.unload(self)
    def load(self):
        Hood.load(self)

        self.parentFSM.getStateNamed(self.__class__.__name__).addChild(self.fsm)
    def exit(self):
        base.localAvatar.setCameraFov(settings['fov'])
        base.camLens.setNearFar(ToontownGlobals.DefaultCameraNear, ToontownGlobals.DefaultCameraFar)

        Hood.exit(self)
Ejemplo n.º 18
0
    def unload(self):
        self.parentFSM.getStateNamed(self.__class__.__name__).removeChild(
            self.fsm)

        Hood.unload(self)
Ejemplo n.º 19
0
    def load(self):
        Hood.load(self)

        self.parentFSM.getStateNamed(self.__class__.__name__).addChild(
            self.fsm)
Ejemplo n.º 20
0
    def exit(self):
        base.localAvatar.setCameraFov(settings['fov'])
        base.camLens.setNearFar(ToontownGlobals.DefaultCameraNear,
                                ToontownGlobals.DefaultCameraFar)

        Hood.exit(self)