def __init__(self): GameMode.__init__(self) self.globals = json.load( open( os.path.join( kDataDir, kGlobals ) ) ) self.roomName = 'PauseMenu' self.image, _ = load_image('PauseMenu.jpg') self.hotspots = [] temp = self.globals['current_note'] self.hotspots.append(Hotspot(pygame.Rect(20, 425, 200, 200), load_sound(temp), "current_note")) self.mouse_down_pos = (-1,-1)#need default position for mouse
def __init__( self ): ## Initialize the superclass. GameMode.__init__( self ) self.image, _ = load_image( 'pause.png' ) self.quit_rect = pygame.Rect( 255, 340, 337, 250 ) self.start_rect = pygame.Rect( 271, 100, 302, 250 ) self.mouse_down_pos = (-1,-1)
def __init__( self, movie, next_mode_name ): ''' Given the file name of a movie, will play that movie until it is over and then transition to the next mode ''' ## Initialize the superclass. GameMode.__init__( self ) self.movieName = movie self.next_mode_name = next_mode_name self.movie = None
def __init__( self, image, duration_in_milliseconds, next_mode_name ): ''' Given a duration to show the splash screen 'duration_in_milliseconds', and the name of the next mode, displays 'image' until either a mouse click or 'duration_in_milliseconds' milliseconds have elapsed. ''' ## Initialize the superclass. GameMode.__init__( self ) self.image = image self.duration = duration_in_milliseconds self.next_mode_name = next_mode_name
def __init__(self): GameMode.__init__(self) self.globals = json.load( open( os.path.join( kDataDir, kGlobals ) ) ) ##Initialize to bedroom self.roomName = '' self.image = None self.exits = [] self.hotspots = [] self._changeRoom('Bedroom') self.mouse_down_pos = (-1,-1)
def __init__(self): ## Initialize the superclass. GameMode.__init__(self) self.image, _ = load_image("MainMenu.jpg") ##load and play music try: backgroundMusic = os.path.join(kDataDir, "Eternal Memory.ogg") pygame.mixer.music.load(backgroundMusic) global splash_bool splash_bool = False global main_menu_bool main_menu_bool = True except pygame.error, message: print "Cannot load music:" raise SystemExit, message
def __init__( self ): ## Initialize the superclass. GameMode.__init__( self ) self.image, _ = load_image( 'MainMenu.jpg' ) self.backgroundMusic = None ##load and play music try: self.backgroundMusic = os.path.join("data",'Eternal Memory.ogg') pygame.mixer.music.load( self.backgroundMusic ) global splash_bool splash_bool = False global main_menu_bool main_menu_bool = True except pygame.error, message: print 'Cannot load music:' raise SystemExit, message
def __init__( self, levels ): ## Initialize the superclass. GameMode.__init__( self ) self.levels = [ Level( name ) for name in levels ] self.current_level_index = 0