mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-27 22:41:56 +08:00
fix: 修复按钮状态和饲料制作数量显示问题
- 在SelectIntialFeed和MakeFeed面板中添加按钮禁用逻辑,防止重复点击 - 将EntityBase中可制作饲料数量从2调整为5 - 修改MakeFeed面板中数量显示格式为字符串插值
This commit is contained in:
@@ -15,6 +15,7 @@ var refreshNeedBaseballCount = 10
|
||||
func _ready():
|
||||
skipBtn.pressed.connect(
|
||||
func():
|
||||
skipBtn.disabled = true
|
||||
finish()
|
||||
)
|
||||
refreshBtn.pressed.connect(
|
||||
@@ -40,6 +41,8 @@ func _ready():
|
||||
func beforeOpen(_args: Array = []):
|
||||
selectedCount = 0
|
||||
regenerateCards()
|
||||
func afterOpen(_args: Array = []):
|
||||
skipBtn.disabled = false
|
||||
|
||||
func clearCards():
|
||||
for i in feedCards.get_children():
|
||||
@@ -47,7 +50,7 @@ func clearCards():
|
||||
avaliableFeeds.add_child(i)
|
||||
func updateValue():
|
||||
waveLabel.text = str(Wave.current + 1)
|
||||
countLabel.text = str(UIState.player.fields[FieldStore.Entity.FEED_COUNT_CAN_MADE] - selectedCount)
|
||||
countLabel.text = "%d" % (UIState.player.fields[FieldStore.Entity.FEED_COUNT_CAN_MADE] - selectedCount)
|
||||
needBB.count = refreshNeedBaseballCount
|
||||
func finish():
|
||||
var center = Vector2.ZERO
|
||||
|
||||
@@ -10,6 +10,7 @@ extends FullscreenPanelBase
|
||||
func _ready():
|
||||
startBtn.pressed.connect(
|
||||
func():
|
||||
startBtn.disabled = true
|
||||
UIState.closeCurrentPanel()
|
||||
StarterPanel.selectingFeed = false
|
||||
)
|
||||
|
||||
@@ -48,7 +48,7 @@ var fields = {
|
||||
"饲料": TITLE_FLAG,
|
||||
FieldStore.Entity.PRICE_REDUCTION: 0,
|
||||
FieldStore.Entity.FEED_COUNT_SHOW: 3,
|
||||
FieldStore.Entity.FEED_COUNT_CAN_MADE: 2,
|
||||
FieldStore.Entity.FEED_COUNT_CAN_MADE: 5,
|
||||
"掉落物": TITLE_FLAG,
|
||||
FieldStore.Entity.DROPPED_ITEM_COLLECT_RADIUS: 60,
|
||||
FieldStore.Entity.GRAVITY: 10,
|
||||
|
||||
Reference in New Issue
Block a user