1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-02 01:11:54 +08:00

feat(武器系统): 调整核弹伤害参数并添加屏幕震动效果

- 降低核弹基础伤害但提高升级后伤害
- 修改爆炸半径范围描述
- 为核弹爆炸添加随时间递减的屏幕震动效果
- 重构CameraManager的shake方法以支持自定义震动曲线
This commit is contained in:
2025-09-21 07:06:43 +08:00
parent 29e745bb58
commit 36bdd8fc27
3 changed files with 12 additions and 7 deletions
+9 -4
View File
@@ -15,9 +15,14 @@ func _physics_process(_delta):
position = UIState.player.position
position += MathTool.randv2_range(shakeIntensity)
static func shake(millseconds: int, intensity: float = 10):
instance.shakeIntensity += intensity
await TickTool.millseconds(millseconds)
instance.shakeIntensity -= intensity
static func shake(millseconds: float, intensity: float = 10, steper: Callable = func(currentValue, _totalValue, _restPercent): return currentValue):
var startTime = WorldManager.getTime()
instance.shakeIntensity = intensity
await TickTool.until(
func():
instance.shakeIntensity = steper.call(instance.shakeIntensity, intensity, 1 - (WorldManager.getTime() - startTime) / millseconds)
return WorldManager.getTime() - startTime >= millseconds
)
instance.shakeIntensity = 0
static func playAnimation(animation: String):
instance.animator.play(animation)