Kaboom JS - How to change sprite
I am working on a game, and am trying to change the sprite of the player to something else after colliding with a item.
i have tried -
player.spriteID = 'abc2'
but they dont work. Is there a way to change sprites through collision?
I take it that 1.)
abc2 is a real sprite that exists, and 2.)
player is properly defined in the collision scope. In that case, the first one should be correct. Can you link your Repl so that we can have the full context to what's hapenning?