screen.blit(logo, (tspw-80, tsph+150) ) # draw cursor screen.blit(cursor.image, (cpw, cph) ) time_passed = clock.tick() cursor.update(time_passed) # get mouse position (for test) #mpos = getpos(screen, mpos) pygame.display.update() # return corrospond value to represent the option if con == "entergame": cleaner(screen) return True elif con == "exit": return False if __name__ == "__main__": pygame.init() screen = pygame.display.set_mode( (640, 480), 0, 32 ) tmp = startscreen(screen) if tmp: print "Enter Game" else: print "Exit Game" pygame.quit()
if enemy1.y <= -199: enemy1.speed = 0 enemy_dir.y = 1.0 for e in enemy_group: screen.blit(e.image, e.get_pos()) e.y += enemy_dir.y * e.speed * time_passed_seconds if e.y >= 400: introB = False enemy_group.update(time_passed) # for detecting the mouse position #mps = getpos(screen, mps) pygame.display.update() cleaner(screen, "down-top") # Intro C start time_count = 0; while introC == True: for event in pygame.event.get(): if event.type == QUIT: pygame.quit() exit() if event.type == KEYDOWN: if event.key == K_ESCAPE: introC = False time_passed = clock.tick() time_passed_seconds = time_passed/1000.