دانلود سورس بازی Flappy Bird با پایتون
Flappy Bird with Pythonتوضیحات مختصر محصول
در این بخش دانلود سورس بازی Flappy Bird با پایتون را برای شما عزیزان آماده دانلود کرده ایم. جهت دانلود سورس می توانید بر روی لینک دانلود محصول کلیک کنید.
درباره سورس کد :
رمز عبور فایل فشرده www.copro.ir می باشد.
بخشی از سورس بازی Flappy Bird با پایتون Python :
def __init__(self, pipe_end_img, pipe_body_img): """Initialises a new random PipePair. The new PipePair will automatically be assigned an x attribute of float(WIN_WIDTH - 1). Arguments: pipe_end_img: The image to use to represent a pipe's end piece. pipe_body_img: The image to use to represent one horizontal slice of a pipe's body. """ self.x = float(WIN_WIDTH - 1) self.score_counted = False self.image = pygame.Surface((PipePair.WIDTH, WIN_HEIGHT), SRCALPHA) self.image.convert() # speeds up blitting self.image.fill((0, 0, 0, 0)) total_pipe_body_pieces = int( (WIN_HEIGHT - # fill window from top to bottom ۳ * Bird.HEIGHT - # make room for bird to fit through ۳ * PipePair.PIECE_HEIGHT) / # 2 end pieces + 1 body piece PipePair.PIECE_HEIGHT # to get number of pipe pieces ) self.bottom_pieces = randint(1, total_pipe_body_pieces) self.top_pieces = total_pipe_body_pieces - self.bottom_pieces # bottom pipe for i in range(1, self.bottom_pieces + 1): piece_pos = (0, WIN_HEIGHT - i*PipePair.PIECE_HEIGHT) self.image.blit(pipe_body_img, piece_pos) bottom_pipe_end_y = WIN_HEIGHT - self.bottom_height_px bottom_end_piece_pos = (0, bottom_pipe_end_y - PipePair.PIECE_HEIGHT) self.image.blit(pipe_end_img, bottom_end_piece_pos) # top pipe for i in range(self.top_pieces): self.image.blit(pipe_body_img, (0, i * PipePair.PIECE_HEIGHT)) top_pipe_end_y = self.top_height_px self.image.blit(pipe_end_img, (0, top_pipe_end_y)) # compensate for added end pieces self.top_pieces += 1 self.bottom_pieces += 1 # for collision detection self.mask = pygame.mask.from_surface(self.image)
نمایش بیشتر
قیمت محصول
11,000 تومان
قوانین استفاده
لینک های دانلود محصولات رایگان پس از تکمیل فرم مربوطه قابل دسترسی هستند و برای محصولات غیر رایگان، بلافاصله پس از پرداخت هزینه محصول در اختیار شما قرار می گیرد.
- دسترسی به فایل محصول به صورت مادامالعمر
- دانلود مستقیم فایل
- مشاوره رایگان قبل و بعد از خرید محصول
- گارانتی بازگشت وجه در صورت خرابی فایل
هیچ دیدگاهی برای این محصول نوشته نشده است.