跟进注释

This commit is contained in:
wszqkzqk 2022-07-28 05:53:32 +08:00
parent f2d1f22e7c
commit 283cf636c4
2 changed files with 2 additions and 3 deletions

View File

@ -34,8 +34,7 @@ class Card():
self.rect = self.orig_image.get_rect() self.rect = self.orig_image.get_rect()
self.rect.x = x self.rect.x = x
self.rect.y = y self.rect.y = y
# 计划以后以此坐标进行相对变化,用字体绘制阳光消耗大小,不再采用现在的图片包含阳光方法 # 绘制植物阳光消耗大小
# 以便减小程序体积并增加可维护性
font = pg.font.Font(c.FONT_PATH, 12) font = pg.font.Font(c.FONT_PATH, 12)
self.sun_cost_img = font.render(str(c.PLANT_CARD_INFO[index][c.SUN_INDEX]), True, c.BLACK) self.sun_cost_img = font.render(str(c.PLANT_CARD_INFO[index][c.SUN_INDEX]), True, c.BLACK)
self.sun_cost_img_rect = self.sun_cost_img.get_rect() self.sun_cost_img_rect = self.sun_cost_img.get_rect()

View File

@ -23,7 +23,7 @@ SCREEN_HEIGHT = 600
SCREEN_SIZE = (SCREEN_WIDTH, SCREEN_HEIGHT) SCREEN_SIZE = (SCREEN_WIDTH, SCREEN_HEIGHT)
# 字体路径 # 字体路径
FONT_PATH = os.path.join(os.path.dirname(os.path.dirname(__file__)),'resources', 'DroidSansFallback.ttf') FONT_PATH = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'resources', 'DroidSansFallback.ttf')
# 选卡数量 # 选卡数量
# 最大数量 # 最大数量