WMICraft/knight.py

18 lines
577 B
Python

import pygame.image
from constants import ROWS, COLUMNS, GRID_CELL_PADDING, GRID_CELL_WIDTH, GRID_CELL_HEIGHT, BORDER_WIDTH, BORDER_RADIUS, \
WINDOW_WIDTH, WINDOW_HEIGHT
class Knight(pygame.sprite.Sprite):
def __init__(self, img):
super().__init__()
self.images = []
self.image = pygame.image.load("resources/textures/knight.png")
self.image = pygame.transform.scale(self.image, (40, 40))
self.images.append(self.image)
self.rect = self.image.get_rect()
knights_list = pygame.sprite.Group()