So basically if you want to make a bounce engine you just need to take the code and you will make the sprite to bounce.