mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-07-08 02:57:06 +08:00
fix: 修复能量值设置逻辑,确保当前值在最小值和最大值之间
fix: 更新苹果数量,增加至10
This commit is contained in:
@@ -22,7 +22,7 @@ func setCurrent(value: float):
|
|||||||
if value == currentValue:
|
if value == currentValue:
|
||||||
return
|
return
|
||||||
forwardDirection = sign(value - currentValue)
|
forwardDirection = sign(value - currentValue)
|
||||||
currentValue = value
|
currentValue = clamp(value, minValue, maxValue)
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
middleValue = currentValue
|
middleValue = currentValue
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ var fields = {
|
|||||||
var inventory = {
|
var inventory = {
|
||||||
ItemStore.ItemType.BASEBALL: 100,
|
ItemStore.ItemType.BASEBALL: 100,
|
||||||
ItemStore.ItemType.BASKETBALL: 100,
|
ItemStore.ItemType.BASKETBALL: 100,
|
||||||
ItemStore.ItemType.APPLE: 3,
|
ItemStore.ItemType.APPLE: 10,
|
||||||
}
|
}
|
||||||
var inventoryMax = {
|
var inventoryMax = {
|
||||||
ItemStore.ItemType.BASEBALL: INF, # 无限
|
ItemStore.ItemType.BASEBALL: INF, # 无限
|
||||||
|
|||||||
Reference in New Issue
Block a user