「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” equals “max_hp” that comes with “GameObject”,
Visibility of “Node2D” = False;
When the variable “hp” that comes with “GameObject” is less than “max_hp”,
Visibility of “Node2D” = True.
How should I write the code?