def enterIdle(self):
     if self.balloon is None:
         self.balloon = DistributedHotAirBalloonAI(self.air)
         self.balloon.generateWithRequired(self.zoneId)
     if config.GetBool('want-doomsday', False):
         self.balloon.b_setState('ElectionIdle')
         if not hasattr(simbase.air, 'cameraManager'):
             camMgr = DistributedElectionCameraManagerAI(simbase.air)
             camMgr.spawnManager()
     else:
         self.balloon.b_setState('Waiting')
     return
 def enterIdle(self):
     # Generate Buddy's Hot Air Balloon!
     if self.balloon is None:
         # Pump some self.air into Buddy's Balloon
         self.balloon = DistributedHotAirBalloonAI(self.air)
         self.balloon.generateWithRequired(self.zoneId)
     if config.GetBool('want-doomsday', False):
         # It's Election day!
         self.balloon.b_setState('ElectionIdle')
         # Better spawn some cameras
         if not hasattr(simbase.air, 'cameraManager'):
             camMgr = DistributedElectionCameraManagerAI(simbase.air)
             camMgr.spawnManager()
     else:
         self.balloon.b_setState('Waiting')
 def enterEvent(self):
     event = simbase.air.doFind('ElectionEvent')
     if event is None:
         event = DistributedElectionEventAI(simbase.air)
         event.generateWithRequired(2000)
     if self.balloon is None:
         # Pump some self.air into Buddy's Balloon
         self.balloon = DistributedHotAirBalloonAI(self.air)
         self.balloon.generateWithRequired(self.zoneId)
     self.eventSequence = Sequence(Func(event.b_setState, 'PreShow'),
                                   Wait(34), Func(event.b_setState,
                                                  'Begin'), Wait(10),
                                   Func(event.b_setState, 'AlecSpeech'),
                                   Wait(128),
                                   Func(event.b_setState, 'VoteBuildup'),
                                   Wait(44),
                                   Func(event.b_setState, 'WinnerAnnounce'),
                                   Wait(12),
                                   Func(event.b_setState, 'CogLanding'),
                                   Wait(117),
                                   Func(event.b_setState, 'Invasion'))
     self.eventSequence.start()