WMICraft/models/knight.py

16 lines
510 B
Python
Raw Normal View History

2022-03-11 19:42:17 +01:00
import pygame.image
2022-03-24 12:54:22 +01:00
import random
2022-03-11 19:42:17 +01:00
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()
2022-03-24 12:54:22 +01:00
self.health = random.randrange(7, 12)
self.attack = random.randrange(3, 7)
2022-03-11 19:42:17 +01:00
knights_list = pygame.sprite.Group()