mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-31 00:11:54 +08:00
feat(战斗系统): 添加KukeMC召唤机制及子实体管理
为KukeMC添加召唤子实体KukeChild的功能,并在血量低于25%时自动清除所有子实体并恢复血量 在EntityBase中添加tryKill方法统一处理实体销毁逻辑 在EntityTool中添加按类查找实体的工具方法
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user