Parallax
Шаблон:Wiki Standards A parallax is a project on which the user controls a background by moving their mouse. Mostly these projects are created so the user can relax and view the sunset or anything else. Sometimes people just like to show off their art in a parallax project.Шаблон:Citation needed
Making a Parallax
When creating a parallax, the art must be broken up into different sprites, and the sprites must be layered to create an image. Once the sprites have been created, use the following script to create the parallax effect:
A handy parallax custom block can be made using the following code:
To use this parallax engine, put the following code in the back sprite
And then in the middle sprite
And in the front sprite
Parallax Effect On Moving Sprite
Sometimes a parallax effect on a moving sprite is desired. This could be used for things like a bird moving across the sky, a sprite walking across the screen, etc. Here's what the custom block looks like:
And here's an example of how it can be used:
This code would make a sprite start on the right side of the screen and move to the left side.