WMICraft/logic/field.py

19 lines
564 B
Python

import pygame
class Field(pygame.sprite.Sprite):
def __init__(self, texture_path, converted_texture, img, rect, row=0, column=0):
super().__init__()
self.texture_path = texture_path
self.converted_texture = converted_texture
self.image = img
self.row = row
self.column = column
self.rect = rect
self.busy = False
self.busy_detection()
def busy_detection(self):
if self.texture_path == 'water.png' or self.texture_path == 'grass_with_tree.jpg':
self.busy = True