add setSprite function and improve Mario demo