I’m making a little mario clone with phaser for a school project and its mostly working. I have been trying to get the question mark blocks to work for a couple days now but i can’t seem to get it done. So I made a new tilemap for the question mark blocks and put them in a layer. I activated collision for them with the game.physics.arcade.collide() command and made it so that when the player collides with the questionmark blocks it executes the spawnMushroom function where it is supposed to delete the block i just collided with but I cant get it to work. the closest thing i got was when it deleted all questionmark blocks.
Any advice on how to do it?