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.
17 lines
378 B
17 lines
378 B
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); |
|
} |
|
} |
|
} |
|
}
|
|
|