Our ninja character needs to be an animated sprite that loops infinitely. The position of the ninja will remain static as we will move the background and foreground to give the illusion of movement.
To create our character, we execute the following steps:
Add a folder to Assets within the Project Browser named
Ninja
.Download and unzip the image
NinjaSpriteSheet.png
from http://freeartsprites.com/free-art/endless-runner/.Slice the sprite sheet into individual animation sprites.
Create a sprite GameObject using the following image:
Name the GameObject
Ninja
.We then go to Add component | Physics 2D | Box Collider 2D.