Compare commits
6 Commits
1d31264c31
...
4b7b2c2a0f
| Author | SHA1 | Date |
|---|---|---|
|
|
4b7b2c2a0f | 8 months ago |
|
|
152298483b | 8 months ago |
|
|
8ae678cc64 | 8 months ago |
|
|
519834d9c8 | 8 months ago |
|
|
8d7efe947f | 8 months ago |
|
|
de87d1410e | 8 months ago |
|
After Width: | Height: | Size: 2.9 MiB |
|
After Width: | Height: | Size: 3.1 MiB |
|
After Width: | Height: | Size: 3.3 MiB |
|
After Width: | Height: | Size: 2.9 MiB |
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 660 KiB |
|
After Width: | Height: | Size: 738 KiB |
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 795 KiB |
|
After Width: | Height: | Size: 880 KiB |
|
After Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 121 KiB |
|
After Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
@ -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
|
||||