2023-03-30 19:54:48 +02:00
|
|
|
import pygame
|
|
|
|
from config import *
|
|
|
|
|
|
|
|
class Infantry_ork(pygame.sprite.Sprite):
|
|
|
|
|
|
|
|
|
|
|
|
def __init__(self, game, x, y):
|
|
|
|
self.game = game
|
2023-03-30 22:09:13 +02:00
|
|
|
self.groups = self.game.all_sprites, self.game.infantry_orks
|
2023-03-30 19:54:48 +02:00
|
|
|
pygame.sprite.Sprite.__init__(self, self.groups)
|
|
|
|
|
|
|
|
self.x = x * TILE_SIZE
|
|
|
|
self.y = y * TILE_SIZE
|
|
|
|
self.width = TILE_SIZE
|
|
|
|
self.height = TILE_SIZE
|
|
|
|
|
|
|
|
self.INFANTRY_ORK_IMG = pygame.image.load("./zdjecia/ork-piechota.png")
|
|
|
|
self.INFANTRY_ORK = pygame.transform.scale(self.INFANTRY_ORK_IMG,(64,64))
|
|
|
|
|
|
|
|
self.image = pygame.Surface([self.width, self.height])
|
|
|
|
self.image.blit(self.INFANTRY_ORK, (0,0))
|
|
|
|
self.image.set_colorkey((0, 0, 0))
|
|
|
|
|
|
|
|
self.rect = self.image.get_rect()
|
|
|
|
self.rect.x = self.x
|
|
|
|
self.rect.y = self.y
|
|
|
|
|
|
|
|
self.level = 2
|