Add an option to ignore emitting VisibilityNotifier siglals when the node exits the tree #4399
me2beats
started this conversation in
Engine Core
Replies: 1 comment
-
When the Balloon exits the tree, it also goes out of view. It does make sense, to me. If this behaviour could be disabled, what would happen when the Node moves in and out of the tree? Should it also not be emitted on |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Say I make 2D 🎈 balloon shooter like in old Siemens mobile.
Each balloon has a VisibilityNotifier.
I have a label that displays the count of missed balloons (so I use screen_exited or viewport_exited signal, which increments the count of missed balloons when a balloon is outside the game window.
The problem is when I shoot a balloon, the above signals also emitted, because I use balloon.queue_free() that calls tree_exited signal and in this case I don't want it.
The solution would be to have an option to ignore tree_exited signal.
Beta Was this translation helpful? Give feedback.
All reactions