giganciprogramowania

lekcja 10 - Jablko.py

Feb 19th, 2022 (edited)
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. import pygame
  2. import random
  3.  
  4. class Jablko(pygame.sprite.Sprite):
  5. def __init__(self):
  6. super(Jablko, self).__init__()
  7. self.obraz = pygame.image.load("images/apple.png")
  8. losowa_pozycja = pygame.Rect(random.randrange(1,25)*32, random.randrange(1,19)*32, 32, 32)
  9. self.rect = losowa_pozycja
Add Comment
Please, Sign In to add comment