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

feat(战斗系统): 添加KukeMC召唤机制及子实体管理

为KukeMC添加召唤子实体KukeChild的功能,并在血量低于25%时自动清除所有子实体并恢复血量
在EntityBase中添加tryKill方法统一处理实体销毁逻辑
在EntityTool中添加按类查找实体的工具方法
This commit is contained in:
2025-09-19 22:11:29 +08:00
parent 020f268c5f
commit ec795e534e
4 changed files with 28 additions and 3 deletions
+5
View File
@@ -344,6 +344,9 @@ func playSound(type: String):
cloned.play()
await cloned.finished
cloned.queue_free()
func tryKill():
kill()
await tryDie()
func getTrackingAnchor() -> Vector2:
return hurtbox.get_node("hitbox").global_position
@@ -376,6 +379,8 @@ func exitStage(_stage: int):
pass
func enterStage(_stage: int):
pass
func kill():
pass
static func generate(
entity: PackedScene,