anasazhar

bird.py

Nov 9th, 2020
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. import pygame
  2.  
  3.  
  4. class Bird:
  5.  
  6.     def __init__(self, Arena_Game):
  7.         #Init Screen For Bird
  8.         self.screen = Arena_Game.screen
  9.         self.screen_rect = Arena_Game.screen.get_rect()
  10.  
  11.         #Init Bird Image
  12.         self.game_settings = Arena_Game.game_settings
  13.         self.image = self.game_settings.bird_image
  14.         self.image_rect = self.image.get_rect()
  15.  
  16.         #Init Bird Position
  17.         self.image_rect.midleft = self.screen_rect.midleft
  18.         self.image_rect.x += 50
  19.  
  20.     def show_bird(self):
  21.         #Show Bird using Blit from Pygame
  22.         self.screen.blit(self.image, self.image_rect)
Advertisement
Add Comment
Please, Sign In to add comment