mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-31 08:21:54 +08:00
feat(武器): 增强格挡武器并添加新特效
增加格挡武器的攻击力从20提升至35 添加冲刺速度随气力增加的机制 为格挡和攻击添加新的视觉特效和音效 调整格挡子弹的碰撞检测形状 优化特效控制器逻辑确保正确释放资源
This commit is contained in:
@@ -15,6 +15,10 @@ func _ready():
|
||||
register()
|
||||
particles.emitting = false
|
||||
particles.one_shot = oneShot
|
||||
func shot():
|
||||
var childParticle = particles.duplicate() as GPUParticles2D
|
||||
childParticle.emitting = true
|
||||
add_child(childParticle)
|
||||
var sound = sounds.get_node_or_null(spawnSound)
|
||||
if sound and sound.stream:
|
||||
sound.play()
|
||||
@@ -22,23 +26,20 @@ func _ready():
|
||||
animator.play(spawnAnimation)
|
||||
if spawnTexture:
|
||||
texture.play(spawnTexture)
|
||||
func shot():
|
||||
var childParticle = particles.duplicate() as GPUParticles2D
|
||||
childParticle.emitting = true
|
||||
add_child(childParticle)
|
||||
if oneShot:
|
||||
await childParticle.finished
|
||||
childParticle.queue_free()
|
||||
if childParticle.emitting:
|
||||
await childParticle.finished
|
||||
childParticle.queue_free()
|
||||
if spawnTexture:
|
||||
if texture.is_playing():
|
||||
await texture.animation_finished
|
||||
texture.hide()
|
||||
if spawnSound:
|
||||
var sound: AudioStreamPlayer2D = sounds.get_node(spawnSound)
|
||||
if sound.playing:
|
||||
await sound.finished
|
||||
if spawnAnimation:
|
||||
if animator.is_playing():
|
||||
await animator.animation_finished
|
||||
if spawnTexture:
|
||||
if texture.is_playing():
|
||||
await texture.animation_finished
|
||||
queue_free()
|
||||
|
||||
func register():
|
||||
|
||||
Reference in New Issue
Block a user