2D Racer Game

011: Race End

create a script called "raceEnd" add this script. create a new scene with a button to restart the race and text to display the race position. Add this script to the canvas and link the button and UI text.





using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class raceEnd : MonoBehaviour {

    public Text finalPOStext;

    // Use this for initialization
    void Awake()

            finalPOStext.text = positions.finalPosition.ToString();


    public void RestartGame()

        Application.LoadLevel (1);



Casino Bet 365 is best casino in the world.

What's Next

Next up for Unity Snippets is a look at game development articles from across the web...

Free Templates - bigtheme.net
Popular Art Betting make bookies articles.