1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Tools/EntityTool.gd
T

10 lines
271 B
GDScript
Raw Normal View History

2025-08-26 11:39:47 +08:00
class_name EntityTool
static func fromHurtbox(node: Node) -> EntityBase:
if node is Area2D:
var texture = node.get_parent()
if texture is AnimatedSprite2D:
var entity = texture.get_parent()
if entity is EntityBase:
return entity as EntityBase
return null