mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-30 07:51:54 +08:00
36bdd8fc27
- 降低核弹基础伤害但提高升级后伤害 - 修改爆炸半径范围描述 - 为核弹爆炸添加随时间递减的屏幕震动效果 - 重构CameraManager的shake方法以支持自定义震动曲线
25 lines
711 B
GDScript
25 lines
711 B
GDScript
extends BulletBase
|
|
class_name NuclearBomb
|
|
|
|
@onready var label: Label = $"%label"
|
|
@onready var anchor: Node2D = $"%anchor"
|
|
|
|
var countdown = 10000
|
|
var radius = 500
|
|
|
|
func spawn():
|
|
hitbox.disabled = true
|
|
hitbox.shape.radius = radius
|
|
anchor.global_rotation = 0
|
|
func ai():
|
|
speed *= 0.99
|
|
PresetBulletAI.forward(self, rotation)
|
|
label.text = "NUCLEAR WARNING %.1f" % ((countdown - timeLived()) / 1000)
|
|
if timeLived() > countdown:
|
|
tryDestroy()
|
|
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)
|