feat(mana): PlayerManager 每帧衰减 mana_heat + 换杖清零
This commit is contained in:
@@ -29,6 +29,7 @@ func _ready() -> void:
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
PlayerStats.regen_mana(delta)
|
||||
PlayerStats.mana_heat = maxf(0.0, PlayerStats.mana_heat - SettingsManager.mana_heat_decay() * delta)
|
||||
_handle_movement(delta)
|
||||
_handle_charge_state(delta)
|
||||
_handle_auto_cast(delta)
|
||||
@@ -90,6 +91,7 @@ func equip_wand(core: CoreDefinition, compiled: CompiledDeck) -> void:
|
||||
PlayerStats.set_mana_pool(core.base_mana_max, core.base_mana_regen)
|
||||
else:
|
||||
PlayerStats.set_mana_pool(100.0, 5.0)
|
||||
PlayerStats.mana_heat = 0.0
|
||||
|
||||
func get_position() -> Vector2:
|
||||
return _position
|
||||
|
||||
Reference in New Issue
Block a user