Male_zoo_Projekt_SI/adult_animal.py
2024-03-10 17:40:26 +01:00

16 lines
496 B
Python

import pygame
from animal import Animal
class AdultAnimal(Animal):
def __init__(self,x,y,image, width=2,height=2):
super().__init__(x,y,image)
self.width=width
self.height=height
def draw(self, screen, grid_size):
new_width = grid_size * self.width
new_height = grid_size * self.height
scaled_image = pygame.transform.scale(self.image, (new_width, new_height))
screen.blit(scaled_image, (self.x * grid_size, self.y * grid_size))