Answer the question
In order to leave comments, you need to log in
How to nicely place two sprites on top of each other with different events?
Good afternoon,
How to correctly place two sprites (using add.sprite()) on top of each other in Phaser.io.
bringToTop allows you to draw them in the right order, but the problem is that both sprites have a click event attached to them, and in any case it handles the event on the bottom sprite, despite the fact that it is overlapped by the top one (it is not transparent and inputEnable is made for it =true) respectively, in fact the bottom one is not even visible.
The events themselves are attached by events.onInputDown.add().
Why is the event of the top sprite not working, and how to fix the situation?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question