def __init__(self): self.window = pygame.display.set_mode((700, 700)) self.platforms = [[400, 700]] self.platform = pygame.image.load("static/platform_mini.png") self.doodler = Doodler() self.curr_level = 50 self.run = True
def __init__(self): self.window = pygame.display.set_mode( (DoodleJump.GAME_FIELD_EDGE, DoodleJump.GAME_FIELD_EDGE)) self.platforms = [[400, DoodleJump.GAME_FIELD_EDGE, 0]] self.sprite = pygame.image.load("static/platform_mini.png") self.doodler = Doodler() self.curr_level = 50 self.run = True
def __init__(self): pygame.init() self.screen = Screen() self.clock = pygame.time.Clock() self.doodler = Doodler(Screen.WIDTH / 2, Screen.HEIGHT / 2) self.p1 = Platform(Screen.WIDTH / 2, Screen.HEIGHT / 2 + 130)
def __init__(self): self.window = pygame.display.set_mode((700, 700)) self.platforms = [[ 400, 700, 0 ]] # третий параметр - стукнулся ли о платформу дудлер # self.sprite_group = pygame.sprite.Group() # не надо? self.platform = pygame.image.load("static/platform_mini.png") self.doodler = Doodler() self.curr_level = 50 self.run = True
def run_game(): # Initialize the game and create screen obj. pygame.init() ai_settings = Settings() screen = pygame.display.set_mode( (ai_settings.screen_width, ai_settings.screen_height)) pygame.display.set_caption("Doodler Fight -- Rubing") doodler = Doodler(ai_settings, screen) #f = open("rect_ship.txt", "w") # Make a group to store bullets in. bullets = Group() # Start the main loop for the game while True: check_events(ai_settings, screen, doodler, bullets) doodler.update() #bullets.update_bullet()#'Group' object has no attribute 'update_bullet' update_bullets(bullets) #f.write("%d\t%d\t%d\t%d\n" % (ship.ship_rect.centerx, ship.screen_rect.centerx, ship.screen_rect.top, ship.screen_rect.bottom)) update_screen(ai_settings, screen, doodler, bullets)
from prohopper.screen import Screen from doodler import Doodler def thisisinit(): print('thisisinit') print('prohopper init') draw = Doodler() # point = doo.point