Trashmaster/map/tile.py

17 lines
376 B
Python
Raw Normal View History

from re import X
import pygame as pg
class Tile(pg.sprite.Sprite):
def __init__(self, img, x, y, width, height):
super().__init__()
self.x = x
self.y = y
self.width = width
self.height = height
self.image = pg.Surface([width, height])
self.image.blit(img, (0,0))
self.rect = pg.Rect(x, y, width, height)