Male_zoo_Projekt_SI/terrain_obstacle.py

13 lines
422 B
Python

import pygame
from abc import ABC, abstractmethod
class Terrain_Obstacle:
def __init__(self, x, y, type , image):
self.x = x - 1
self.y = y - 1
self.type = type
self.image = image
def draw(self, screen, grid_size):
scaled_image = pygame.transform.scale(self.image, (grid_size, grid_size))
screen.blit(scaled_image, (self.x * grid_size, self.y * grid_size))