forked from s464965/WMICraft
12 lines
385 B
Python
12 lines
385 B
Python
import pygame
|
|
|
|
from common.helpers import parse_cord
|
|
|
|
|
|
class Tile(pygame.sprite.Sprite):
|
|
def __init__(self, position, image, group, tile_type=' '):
|
|
super().__init__(group)
|
|
self.image = image
|
|
position_in_px = (parse_cord(position[1]), parse_cord(position[0]))
|
|
self.rect = self.image.get_rect(topleft=position_in_px)
|
|
self.tile_type = tile_type |