我的“GameObject”里有一个子节点“Node2D”,
我想要在“Node2D”上增加一个GDscript,
让“GameObject”自带的变量“hp”=“max_hp”的时候,
“Node2D”的可见性 = False;
“GameObject”自带的变量“hp”<“max_hp”的时候,
“Node2D”的可见性 = True;
请问我应该怎么写代码?
I have a child node “Node2D” in my “GameObject”,
I want to add a GDscript to “Node2D”,
When the variable “hp” = “max_hp” that comes with “GameObject”,
Visibility of “Node2D” = False;
When the variables “hp” that come with “GameObject” < “max_hp”,
Visibility of “Node2D” = True;
How should I write code?