You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
444 B

# Map.py
import pygame
from Constant import IMAGE_PATH
# 创建地图类
class Map:
# 存储两张不同颜色的图片名称
map_names_list = [IMAGE_PATH + "map1.png", IMAGE_PATH + "map2.png"]
# 初始化地图
def __init__(self, x, y, img_index):
self.image = pygame.image.load(Map.map_names_list[img_index])
self.position = (x, y)
# 是否能够种植
self.can_grow = True