2023-03-31 11:54:10 +02:00
|
|
|
import pygame
|
|
|
|
|
2023-04-14 12:31:54 +02:00
|
|
|
# Farbe Weiß
|
|
|
|
WHITE = (255, 255, 255)
|
2023-03-31 11:54:10 +02:00
|
|
|
|
2023-04-25 08:30:43 +02:00
|
|
|
|
2023-03-31 11:54:10 +02:00
|
|
|
class Erz(pygame.sprite.Sprite):
|
2023-04-25 08:30:43 +02:00
|
|
|
def __init__(self, x, y):
|
2023-03-31 11:54:10 +02:00
|
|
|
super().__init__()
|
2023-04-22 12:45:53 +02:00
|
|
|
self.image = pygame.image.load("resources/Erzmine.png").convert_alpha()
|
2023-03-31 11:54:10 +02:00
|
|
|
self.rect = self.image.get_rect()
|
2023-04-25 08:30:43 +02:00
|
|
|
self.rect = x, y
|
2023-03-31 11:54:10 +02:00
|
|
|
|
|
|
|
def draw(self, win):
|
|
|
|
groesse = pygame.transform.scale(self.image, (100, 100))
|
|
|
|
win.blit(groesse, self.rect)
|
|
|
|
|
|
|
|
|
|
|
|
class Tank(pygame.sprite.Sprite):
|
2023-04-25 08:30:43 +02:00
|
|
|
def __init__(self, x, y):
|
2023-03-31 11:54:10 +02:00
|
|
|
super().__init__()
|
2023-04-25 08:30:43 +02:00
|
|
|
self.image = pygame.image.load("resources/Tank.jpg").convert_alpha()
|
2023-03-31 11:54:10 +02:00
|
|
|
self.rect = self.image.get_rect()
|
2023-04-25 08:30:43 +02:00
|
|
|
self.rect.center = x, y
|
2023-03-31 11:54:10 +02:00
|
|
|
|
|
|
|
def draw(self, win):
|
|
|
|
groesse = pygame.transform.scale(self.image, (100, 100))
|
|
|
|
win.blit(groesse, self.rect)
|
|
|
|
|
|
|
|
|
|
|
|
class Ziel(pygame.sprite.Sprite):
|
2023-04-25 08:30:43 +02:00
|
|
|
def __init__(self, x, y):
|
2023-03-31 11:54:10 +02:00
|
|
|
super().__init__()
|
2023-04-25 08:30:43 +02:00
|
|
|
self.image = pygame.image.load("resources/Ziel.jpg").convert_alpha()
|
2023-03-31 11:54:10 +02:00
|
|
|
self.rect = self.image.get_rect()
|
2023-04-25 08:30:43 +02:00
|
|
|
self.rect = x, y
|
2023-03-31 11:54:10 +02:00
|
|
|
|
|
|
|
def draw(self, win):
|
|
|
|
groesse = pygame.transform.scale(self.image, (100, 100))
|
|
|
|
win.blit(groesse, self.rect)
|