-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathclass_kaktus.py
37 lines (26 loc) · 1.04 KB
/
class_kaktus.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import pygame
from class_obstract_opstical import obstical
class short_kaktus(obstical):
def __init__(self):
super().__init__()
# self.image = pygame.image.load('cactus.png')
# self.image = pygame.transform.scale(self.image, (40, 50))
self.image = pygame.Surface((40, 30))
self.image.fill(pygame.Color('white'))
self.rect = self.image.get_rect()
self.rect.x = 900
self.rect.y = 470
def draw_coligion(self, screen):
pygame.draw.rect(screen, pygame.Color('red'), (self.rect), 2)
class long_kaktus(obstical):
def __init__(self):
super().__init__()
# self.image = pygame.image.load('cactus.png')
# self.image = pygame.transform.scale(self.image, (40, 50))
self.image = pygame.Surface((40, 90))
self.image.fill(pygame.Color('white'))
self.rect = self.image.get_rect()
self.rect.x = 900
self.rect.y = 410
def draw_coligion(self, screen):
pygame.draw.rect(screen, pygame.Color('red'), (self.rect), 2)