mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-01 08:51:53 +08:00
feat(武器系统): 调整核弹伤害参数并添加屏幕震动效果
- 降低核弹基础伤害但提高升级后伤害 - 修改爆炸半径范围描述 - 为核弹爆炸添加随时间递减的屏幕震动效果 - 重构CameraManager的shake方法以支持自定义震动曲线
This commit is contained in:
@@ -12,7 +12,7 @@ quality = 4
|
||||
typeTopic = 2
|
||||
costBeachball = 100
|
||||
store = {
|
||||
"atk": 200,
|
||||
"atk": 10,
|
||||
"radius": 400.0
|
||||
}
|
||||
storeType = {
|
||||
@@ -22,7 +22,6 @@ storeType = {
|
||||
descriptionTemplate = "倒计时10秒后对半径$radius范围的实体造成$atk点[b]无差别伤害[/b]。"
|
||||
needEnergy = 200.0
|
||||
cooldown = 1000.0
|
||||
debugRebuild = true
|
||||
|
||||
[node name="avatar" parent="container/info" index="0"]
|
||||
texture = ExtResource("2_5nh8i")
|
||||
@@ -45,4 +44,4 @@ typeTopicColorMap = {
|
||||
}
|
||||
|
||||
[node name="description" parent="container" index="2"]
|
||||
text = "[center]倒计时10秒后对半径[color=cyan]400[/color]→[color=yellow]1020[/color]范围的实体造成[color=cyan]200[/color]→[color=yellow]45[/color]点[b]无差别伤害[/b]。[/center]"
|
||||
text = "[center]倒计时10秒后对半径[color=cyan]400[/color]→[color=yellow]420[/color]范围的实体造成[color=cyan]200[/color]→[color=yellow]225[/color]点[b]无差别伤害[/b]。[/center]"
|
||||
|
||||
@@ -20,4 +20,5 @@ func ai():
|
||||
func destroy(_b):
|
||||
EffectController.create(preload("res://components/Effects/NuclearExplosion.tscn"), global_position).shot()
|
||||
hitbox.disabled = false
|
||||
CameraManager.shake(5000, 250, func(_c, t, r): return t * r) # 震屏强度随进度递减
|
||||
await TickTool.frame(5)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user