parent
1d31264c31
commit
00fdf1b02b
|
After Width: | Height: | Size: 2.9 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 121 KiB |
|
After Width: | Height: | Size: 98 KiB |
@ -0,0 +1,14 @@
|
||||
import pygame
|
||||
import settings
|
||||
|
||||
class Obstacle:
|
||||
def __init__(self, x, y, image_path):
|
||||
self.image = pygame.image.load(image_path).convert_alpha()
|
||||
self.image = pygame.transform.scale(self.image, (300, 150)) # Größe anpassen
|
||||
self.rect = self.image.get_rect(topleft=(x, y))
|
||||
|
||||
def draw(self, screen, camera_offset):
|
||||
screen.blit(self.image, (self.rect.x - camera_offset, self.rect.y))
|
||||
|
||||
def get_rect(self):
|
||||
return self.rect
|
||||
Loading…
Reference in new issue