1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-08 20:57:13 +08:00

feat(调试工具): 添加武器过滤器组件并重构Feed过滤器

重构FeedFilter.gd使用Watcher类来管理状态,并添加新的WeaponFilter组件用于武器过滤
This commit is contained in:
2026-05-10 13:38:29 +08:00
parent 6e0d0ad89b
commit 0a5041348e
4 changed files with 33 additions and 16 deletions
+20
View File
@@ -0,0 +1,20 @@
@tool
extends Control
@export var clickToRebuild: bool = false
var watcher = Watcher.new(false)
func _ready():
watcher.changed.connect(rebuild)
rebuild()
func _process(_delta):
watcher.setState(clickToRebuild)
func rebuild():
for i in get_children():
i.queue_free()
var files = DirTool.listdir("res://components/Weapons/")
for file in files:
var weapon = load(file).instantiate() as Weapon
add_child(weapon)