So I am creating a game where the user a node/button and I want to be able to check which node is pressed to allow a different action to occur. Basically, how do I find out which node is pressed because there are many nodes which could be pressed?
Thanks.
Defold way means you should register all active nodes to some array and iterate it within on_input()
function. Of course there are lots libs for do this for you. Like this simple modules:
defold-input/button.md at master · britzl/defold-input · GitHub,
defold-things/simple_input.md at master · Dragosha/defold-things · GitHub
or even GUI system, like GitHub - britzl/gooey: Defold GUI system and GitHub - Insality/druid: Defold UI component library
2 Likes
Okay, thanks! I will give these a try!
Okay, thanks!