mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-31 08:21:54 +08:00
feat(武器系统): 添加核弹武器及相关资源
实现核弹武器功能,包括: - 添加核弹控制器武器脚本和场景 - 实现核弹子弹逻辑和爆炸效果 - 添加相关图片、音效资源 - 更新角色武器库包含核弹 - 调整武器名称颜色配置
This commit is contained in:
@@ -3,9 +3,11 @@ class_name EffectController
|
||||
|
||||
@export var oneShot: bool = true
|
||||
@export var spawnSound: String = ""
|
||||
@export var spawnAnimation: String = ""
|
||||
|
||||
@onready var particles: GPUParticles2D = $"%particles"
|
||||
@onready var sounds = $"%sounds"
|
||||
@onready var sounds: Node2D = $"%sounds"
|
||||
@onready var animator: AnimationPlayer = $"%animator"
|
||||
|
||||
func _ready():
|
||||
particles.emitting = false
|
||||
@@ -13,6 +15,8 @@ func _ready():
|
||||
var sound = sounds.get_node_or_null(spawnSound)
|
||||
if sound and sound.stream:
|
||||
sound.play()
|
||||
if spawnAnimation:
|
||||
animator.play(spawnAnimation)
|
||||
func shot():
|
||||
var cloned = particles.duplicate() as GPUParticles2D
|
||||
cloned.emitting = true
|
||||
|
||||
Reference in New Issue
Block a user