WMICraft/knight.py
2022-03-09 16:59:58 +01:00

20 lines
623 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, x, y, img):
super().__init__()
self.x = x
self.y = y
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()