Sound To Buttons - Godot 4.3 Tutorial
Вставка
- Опубліковано 14 лис 2024
- ►︎ Join Discord: / discord
► GitHub Source Code: github.com/tai...
► Ko-fi: ko-fi.com/crow...
------------------------------------------
@liblast
www.youtube.co...
@KenneyNL
kenney.nl/asse...
------------------------------------------
Chapters:
00:00 Comment chapters and ill input them here
thank you very much this was helfull
There are definitely some critiques with the second method. The first being that this forces you into an extremely narrow naming convention since every possible audio file that could be used for the hover sound has to have the same name. Plus, if you wanted to have each hover signal cause the sound to increment through a melody this wouldn't work.
The second being that the mouse_enter and mouse_exit signals are inherited the control node so you can make your buttons the children of a control node, and then pass the mouse_over action from the buttons to the parent; then handle the signal with the parent control node.
Lastly, the on_pressed signals are all going to be executing their own code anyway so you're not saving yourself work by having them grouped into this manager. Not to mention that you're limiting yourself to a single sound per type of button. For example, if you want the button that takes you to the main game loop to be different from those that go to different sub-menus.
You make a good point about it forces you into a narrow naming convention, but you could choose to not install on certain one and do those manually. I had not thought of the second point, actually I might experiment with that. Third point you're right i if you don't want all buttons to have the same hover and press then doing them manually gives you more control.