resources
@ -6,7 +6,7 @@ WHITE = (255, 255, 255)
|
||||
class Erz(pygame.sprite.Sprite):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.image = pygame.image.load("Erzmine.png").convert_alpha()
|
||||
self.image = pygame.image.load("resources/Erzmine.png").convert_alpha()
|
||||
self.rect = self.image.get_rect()
|
||||
self.rect = 330, 20
|
||||
|
||||
@ -21,7 +21,7 @@ class Tank(pygame.sprite.Sprite):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.image = pygame.image.load("Tank.png").convert_alpha()
|
||||
self.image = pygame.image.load("resources/Tank.png").convert_alpha()
|
||||
self.rect = self.image.get_rect()
|
||||
self.rect = 30, 220
|
||||
|
||||
@ -36,7 +36,7 @@ class Ziel(pygame.sprite.Sprite):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.image = pygame.image.load("Ziel.png").convert_alpha()
|
||||
self.image = pygame.image.load("resources/Ziel.png").convert_alpha()
|
||||
self.rect = self.image.get_rect()
|
||||
self.rect = 330, 520
|
||||
|
||||
|
2
game.py
@ -14,7 +14,7 @@ def start():
|
||||
Tanken = background.Tank()
|
||||
Ziele = background.Ziel()
|
||||
|
||||
tile_set = pygame.image.load("roads2W.png").convert_alpha()
|
||||
tile_set = pygame.image.load("resources/roads2W.png").convert_alpha()
|
||||
|
||||
# Farben
|
||||
white = (255, 255, 255)
|
||||
|
@ -6,7 +6,7 @@ from fahrzeug import Fahrzeug
|
||||
class Helicopter(Fahrzeug, pygame.sprite.Sprite):
|
||||
def __init__(self, x, y):
|
||||
super().__init__(x, y)
|
||||
self.image = pygame.image.load("helicopter.jpg").convert_alpha()
|
||||
self.image = pygame.image.load("resources/helicopter.jpg").convert_alpha()
|
||||
self.image = self.image.subsurface(44, 0, 44, 99)
|
||||
self.rect = self.image.get_rect(center=(x, y))
|
||||
self.rect.centerx = x
|
||||
|
@ -4,7 +4,7 @@ from fahrzeug import Fahrzeug
|
||||
class Player(Fahrzeug, pygame.sprite.Sprite):
|
||||
def __init__(self, x, y):
|
||||
super().__init__(x, y)
|
||||
self.image = pygame.image.load("player.png").convert_alpha()
|
||||
self.image = pygame.image.load("resources/player.png").convert_alpha()
|
||||
self.rect = self.image.get_rect(center=(x, y))
|
||||
self.rect.centerx = x
|
||||
self.rect.centery = y
|
||||
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 110 KiB |
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
2
rotor.py
@ -5,7 +5,7 @@ from fahrzeug import Fahrzeug
|
||||
class Rotor(Fahrzeug, pygame.sprite.Sprite):
|
||||
def __init__(self, x, y):
|
||||
super().__init__(x, y)
|
||||
self.image = pygame.image.load("helicopter.jpg").convert_alpha()
|
||||
self.image = pygame.image.load("resources/helicopter.jpg").convert_alpha()
|
||||
self.image = self.image.subsurface(132, 98, 94, 94)
|
||||
self.rect = self.image.get_rect(center=(x, y))
|
||||
|
||||
|
@ -2,7 +2,7 @@ import pygame
|
||||
class tilemap(pygame.sprite.Sprite):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.image = pygame.image.load("roads2w.png").convert_alpha()
|
||||
self.image = pygame.image.load("resources/roads2W.png").convert_alpha()
|
||||
self.scaled_image = pygame.transform.scale(self.image, (self.image.get_width()*4, self.image.get_height()*4))
|
||||
self.rect = self.image.get_rect()
|
||||
self.rect = 0, 0
|
||||
|