From 124ccc0e156a7993d181d62686033638c2778feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E5=A4=96=E4=B9=8B=E7=A5=9E?= Date: Sat, 16 Apr 2022 10:03:39 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E9=80=89=E5=8D=A1=E6=95=B0?= =?UTF-8?q?=3D=E6=9C=80=E5=A4=A7=E9=80=89=E5=8D=A1=E6=95=B0=E6=89=8D?= =?UTF-8?q?=E8=83=BD=E8=BF=9B=E5=85=A5=E4=B8=8B=E4=B8=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/component/map.py | 1 + source/component/menubar.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/component/map.py b/source/component/map.py index eb1f393..e1605b7 100755 --- a/source/component/map.py +++ b/source/component/map.py @@ -24,6 +24,7 @@ class Map(): # 应当改成元组,保存南瓜头、花盆、睡莲等状态 # 当然,不用元组的话字符串也行,但是得把判断植物写在母函数中,并且需要更多参数 # 这样返回的就是一个具体信息,而非bool值了 + # 到时候还要改一下变量名,还叫isMovable不合适 return (self.map[map_y][map_x] == c.MAP_EMPTY) def getMapIndex(self, x, y): diff --git a/source/component/menubar.py b/source/component/menubar.py index 2ed9d3c..d05027a 100755 --- a/source/component/menubar.py +++ b/source/component/menubar.py @@ -8,8 +8,9 @@ PANEL_Y_START = 87 PANEL_X_START = 22 PANEL_Y_INTERNAL = 74 PANEL_X_INTERNAL = 53 -CARD_LIST_NUM = 0 -CARD_MAX_NUM = 8 +# 以后可以增加到10,并且增加解锁功能 +CARD_LIST_NUM = 8 +CARD_MAX_NUM = CARD_LIST_NUM card_name_list = [c.CARD_SUNFLOWER, c.CARD_PEASHOOTER, c.CARD_SNOWPEASHOOTER, c.CARD_WALLNUT, c.CARD_CHERRYBOMB, c.CARD_THREEPEASHOOTER, c.CARD_REPEATERPEA, c.CARD_CHOMPER,