Hi,
I want to implement multiple buttons that each have the same:
- click animation
- click sound
They all have different:
- image/texture
- action/behaviour
My goal is to easily add new buttons to the game without reimplementing animation and sound.
In Godot I would have a scene with all the elements in it, and would create inherited copies of this scene where I then simply change the texture.
How would I go about this in Defold?
Right now I would:
- add the button click sound to the collection
- add the button animation script to the main gui script
- handle button click in main gui script and call animation and sound
But this feels a bit all over the place. I would like to keep the button elements together…
Edit: Maybe collections are the way to go? But how would they fit in cleanly with the main gui?