How to change the sprite in Kaboom.js
What I want is simple. I took the Kaboom.js platformer template and I'm learning from it. The ground always has grass on top, but I want it to change to a dirt block if it's below another block.
What I need is some way to change the sprite.
grass.sprite = "dirt" and
grass.spriteId = "dirt" and anything else I could think of that might possibly work. Does anyone know how to do it?
The code is at line 118