world: the main scene of game. it include player scene and enemy scene
player: has it’s some info, such as health, whatever.
enemy: want to know player health
In the enemy ready function, how to get player’s hp?
I have watch a tutorial video. His solution was put player in a group. then enemy @onready var player = get_tree().get_first_node_in_group('player') as Player
I’m wondering if there’s any other way