mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
fix(EntityBase): 限制能量值不超过最大值
style(Starter): 更新游戏模式选项文本描述
This commit is contained in:
@@ -322,6 +322,7 @@ func collectItem(itemType: ItemStore.ItemType, amount: int):
|
||||
UIState.showTip("[b]%s[/b]已自动强化!" % weapon.displayName)
|
||||
func storeEnergy(value: float, dontChangeDirection: bool = false):
|
||||
energy += value * fields.get(FieldStore.Entity.ENERGY_MULTIPILER)
|
||||
energy = clamp(energy, 0, fields[FieldStore.Entity.MAX_ENERGY])
|
||||
energyChanged.emit(energy, dontChangeDirection)
|
||||
func finalEnergy(base: float):
|
||||
return base / fields.get(FieldStore.Entity.SAVE_ENERGY)
|
||||
|
||||
Reference in New Issue
Block a user