def __init__(self): Scene.__init__(self, 'game1', 'orchestra_cat_idle.jpg') self.timer = Timer(990, 600, 80, True, 3) self.x = self.width / 6 self.y = self.height * 3 / 4 self.cursor = Cursor(256, 485, (5, 170), True) self.notes = [] self.click = False self.won = False self.cling_start = False self.red_position = -1 self.gen_notes() self.ding_background = pygame.image.load(os.path.join('assets', 'orchestra_cat_idle_ding.jpg')) self.ding_background = pygame.transform.scale(self.ding_background, pygame.display.get_surface().get_size()) self.dong_background = pygame.image.load(os.path.join('assets', 'orchestra_cat_idle_ding_elephant.jpg')) self.dong_background = pygame.transform.scale(self.dong_background, pygame.display.get_surface().get_size()) self.base_background = self.background self.cling_sound = pygame.mixer.Sound(os.path.join('assets', 'ding.wav')) self.clong_sound = pygame.mixer.Sound(os.path.join('assets', 'elephant.wav')) self.notes_pictures = { "black": pygame.transform.scale(pygame.image.load(os.path.join('assets', 'note_black.png')), (36, 80)), "red": pygame.transform.scale(pygame.image.load(os.path.join('assets', 'note_red.png')), (36, 80)), "yellow": pygame.transform.scale(pygame.image.load(os.path.join('assets', 'note_yellow.png')), (18, 40)) }
def __init__(self): Scene.__init__(self, 'splash', 'background_yellow.png') self.gallery = ButtonImage(100, 550, 'gallery.png', (108, 108), True) self.start_button = ButtonImage(self.width / 2 + 30, self.height * 0.6, 'start.png', (300, 200), True) self.title = pygame.image.load(os.path.join('assets', 'title.png')) self.title = pygame.transform.scale(self.title, pygame.display.get_surface().get_size())
def __init__(self): Scene.__init__(self, 'gallery', 'menu_background.png') self.font_title = pygame.font.Font( os.path.join('assets', 'SigmarOne-Regular.ttf'), 80) self.font_back = pygame.font.Font( os.path.join('assets', 'SigmarOne-Regular.ttf'), 30) self.back = ButtonImage(100, 80, 'back.png', (130, 130), True) self.back_text = self.font_back.render("Back", True, (255, 255, 255)) self.title = self.font_title.render("Gallery", True, (255, 255, 255))
def __init__(self): Scene.__init__(self, 'game0', 'orchestra_dog.jpg') self.gauge = Gauge(100, self.height / 2, (50, 200), True, 5) self.timer = Timer(990, 600, 80, True, 3) self.click = False self.clap = pygame.image.load(os.path.join('assets', 'clap.png')) self.no_clap = pygame.image.load(os.path.join('assets', 'no_clap.png')) self.clap_sound = pygame.mixer.Sound(os.path.join( 'assets', 'clip.wav')) self.current_clap = self.no_clap