mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-30 23:32:29 +08:00
fix(EntityBase): 限制能量值不超过最大值
style(Starter): 更新游戏模式选项文本描述
This commit is contained in:
@@ -299,11 +299,11 @@ theme = ExtResource("4_lfxcn")
|
|||||||
selected = 0
|
selected = 0
|
||||||
allow_reselect = true
|
allow_reselect = true
|
||||||
item_count = 3
|
item_count = 3
|
||||||
popup/item_0/text = "无尽波次"
|
popup/item_0/text = "无尽波次·标准游戏体验"
|
||||||
popup/item_0/id = 0
|
popup/item_0/id = 0
|
||||||
popup/item_1/text = "Boss Rush"
|
popup/item_1/text = "Boss Rush"
|
||||||
popup/item_1/id = 1
|
popup/item_1/id = 1
|
||||||
popup/item_2/text = "割草"
|
popup/item_2/text = "割草·高难度⚠️"
|
||||||
popup/item_2/id = 2
|
popup/item_2/id = 2
|
||||||
|
|
||||||
[node name="useTutorial" type="HBoxContainer" parent="content/wrapper/layout/startGameWrapper/start/starter/singleplayer/playConfig" index="2" unique_id=2079979053]
|
[node name="useTutorial" type="HBoxContainer" parent="content/wrapper/layout/startGameWrapper/start/starter/singleplayer/playConfig" index="2" unique_id=2079979053]
|
||||||
|
|||||||
@@ -322,6 +322,7 @@ func collectItem(itemType: ItemStore.ItemType, amount: int):
|
|||||||
UIState.showTip("[b]%s[/b]已自动强化!" % weapon.displayName)
|
UIState.showTip("[b]%s[/b]已自动强化!" % weapon.displayName)
|
||||||
func storeEnergy(value: float, dontChangeDirection: bool = false):
|
func storeEnergy(value: float, dontChangeDirection: bool = false):
|
||||||
energy += value * fields.get(FieldStore.Entity.ENERGY_MULTIPILER)
|
energy += value * fields.get(FieldStore.Entity.ENERGY_MULTIPILER)
|
||||||
|
energy = clamp(energy, 0, fields[FieldStore.Entity.MAX_ENERGY])
|
||||||
energyChanged.emit(energy, dontChangeDirection)
|
energyChanged.emit(energy, dontChangeDirection)
|
||||||
func finalEnergy(base: float):
|
func finalEnergy(base: float):
|
||||||
return base / fields.get(FieldStore.Entity.SAVE_ENERGY)
|
return base / fields.get(FieldStore.Entity.SAVE_ENERGY)
|
||||||
|
|||||||
Reference in New Issue
Block a user