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

feat(武器): 增强核弹效果并添加警告动画

- 提升核弹的攻击力和爆炸半径
- 为核弹添加逐渐扩大的红色警告环
- 改进核爆炸效果,调整粒子参数和震动强度
- 新增填充环着色器用于警告效果
This commit is contained in:
2025-09-21 07:38:09 +08:00
parent 9ff23e08f2
commit 844c2cb501
6 changed files with 53 additions and 11 deletions
+5 -2
View File
@@ -3,6 +3,7 @@ class_name NuclearBomb
@onready var label: Label = $"%label"
@onready var anchor: Node2D = $"%anchor"
@onready var warn: ShaderStage = $"%warn"
var countdown = 10000
var radius = 500
@@ -14,11 +15,13 @@ func spawn():
func ai():
speed *= 0.99
PresetBulletAI.forward(self, rotation)
label.text = "NUCLEAR WARNING %.1f" % ((countdown - timeLived()) / 1000)
if timeLived() > countdown:
tryDestroy()
else:
warn.size = Vector2.ONE * 2 * radius * (timeLived() / countdown)
label.text = "NUCLEAR WARNING %.1f" % ((countdown - timeLived()) / 1000)
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) # 震屏强度随进度递减
CameraManager.shake(5000, 500, func(_c, t, r): return t * r) # 震屏强度随进度递减
await TickTool.frame(5)