def unload(self):
        CogHQExterior.unload(self)

        for train in self.trains:
            train.delete()

        self.trains = None
    def unload(self):
        CogHQExterior.unload(self)

        for train in self.trains:
            train.delete()

        self.trains = None
    def load(self):
        CogHQExterior.load(self)

        if not self.trains:
            self.trains = []
            for track in self.TrainTracks:
                train = Train.Train(track['start'], track['end'], self.TrainTracks.index(track), len(self.TrainTracks))
                self.trains.append(train)
    def load(self):
        CogHQExterior.load(self)

        if not self.trains:
            self.trains = []
            for track in self.TrainTracks:
                train = Train.Train(track['start'], track['end'],
                                    self.TrainTracks.index(track),
                                    len(self.TrainTracks))
                self.trains.append(train)
    def __init__(self, loader, parentFSM, doneEvent):
        CogHQExterior.__init__(self, loader, parentFSM, doneEvent)

        self.elevatorDoneEvent = "elevatorDone"
        self.trains = None
        self.fsm.addState(State.State("elevator", self.enterElevator, self.exitElevator, ["walk", "stopped"]))
        state = self.fsm.getStateNamed("walk")
        state.addTransition("elevator")
        state = self.fsm.getStateNamed("stopped")
        state.addTransition("elevator")
        state = self.fsm.getStateNamed("stickerBook")
        state.addTransition("elevator")
 def __init__(self, loader, parentFSM, doneEvent):
     CogHQExterior.__init__(self, loader, parentFSM, doneEvent)
     self.elevatorDoneEvent = 'elevatorDone'
     self.trains = None
     self.fsm.addState(State.State('elevator', self.enterElevator, self.exitElevator, ['walk', 'stopped']))
     state = self.fsm.getStateNamed('walk')
     state.addTransition('elevator')
     state = self.fsm.getStateNamed('stopped')
     state.addTransition('elevator')
     state = self.fsm.getStateNamed('stickerBook')
     state.addTransition('elevator')
     state = self.fsm.getStateNamed('squished')
     state.addTransition('elevator')
예제 #7
0
    def __init__(self, loader, parentFSM, doneEvent):
        CogHQExterior.__init__(self, loader, parentFSM, doneEvent)

        self.elevatorDoneEvent = 'elevatorDone'
        self.trains = None
        self.fsm.addState(
            State.State('elevator', self.enterElevator, self.exitElevator,
                        ['walk', 'stopped']))
        state = self.fsm.getStateNamed('walk')
        state.addTransition('elevator')
        state = self.fsm.getStateNamed('stopped')
        state.addTransition('elevator')
        state = self.fsm.getStateNamed('stickerBook')
        state.addTransition('elevator')
    def enter(self, requestStatus):
        CogHQExterior.enter(self, requestStatus)

        self.loader.hood.startSky()
    def exit(self):
        self.loader.hood.stopSky()

        CogHQExterior.exit(self)
    def exit(self):
        CogHQExterior.exit(self)

        for train in self.trains:
            train.hide()
    def enter(self, requestStatus):
        CogHQExterior.enter(self, requestStatus)

        for train in self.trains:
            train.show()
    def exit(self):
        CogHQExterior.exit(self)

        for train in self.trains:
            train.hide()
    def enter(self, requestStatus):
        CogHQExterior.enter(self, requestStatus)

        for train in self.trains:
            train.show()