You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
378 B
18 lines
378 B
3 years ago
|
using System;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.SceneManagement;
|
||
|
|
||
|
namespace UnityStandardAssets._2D
|
||
|
{
|
||
|
public class Restarter : MonoBehaviour
|
||
|
{
|
||
|
private void OnTriggerEnter2D(Collider2D other)
|
||
|
{
|
||
|
if (other.tag == "Player")
|
||
|
{
|
||
|
SceneManager.LoadScene(SceneManager.GetSceneAt(0).name);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|