Create a game like Spring Ninja with Unity – step 2

Here we go with the second step of the Spring Ninja prototype made with Unity.

This is what we are going to get at the end of the post:

You know how play: press and hold the mouse to charge, release to jump. The game is an endless runner so you will always find plenty of poles where to jump on.

You don’t need to add or edit any prefab to the project you created in the first step, but to improve gameplay is highly recommended you check “Fixed Angle” in the Rigidbody 2D inspector to keep your “ninja” in a fixed angle and prevent it to fall down too often.

Then here are the four scripts, with new/modified lines highlighted: MainScript:

PoleScript:

PowerScript:

And finally NinjaScript:

And our Spring Ninja prototype made with Unity is completed. Download the source code of the entire project.

  • aman

    First of all, great work…. really like your Tutorials. Looking forward to learn more Unity5 from your tutorials. Please do explain the flow of scripts in your tuts .
    Please give a few tutorials on “How to create sprites in PS or any other free software and how to use them in Unity5”.

    while trying above tutorial…. even after copy pasting whole scripts, I got following ERROR
    “UnityException: Tag: Pole is not defined.
    PoleScript.Start () (at Assets/PoleScript.cs:8) ”

    thanks in advance :)))

  • Pingback: Lesson 3: Finish the Prototype | CTE Courses()