Skip to content

FinishLine

Tyler Nichols edited this page Jun 15, 2017 · 1 revision
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class FinishLine : MonoBehaviour {

	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		
	}

	void OnTriggerEnter(Collider other) {
		if (other.CompareTag ("Player")) {
			Debug.Log ("finished game");
			SceneManager.LoadScene ("restart");
		}
	}
}

Clone this wiki locally