mirror of
https://github.com/Fluffy-Bean/Again.git
synced 2025-05-14 13:12:16 +00:00
16 lines
373 B
C#
16 lines
373 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class endTrigger : MonoBehaviour
|
|
{
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
if (other.gameObject.CompareTag("Player"))
|
|
{
|
|
SceneManager.LoadScene("end");
|
|
SceneManager.UnloadSceneAsync("game");
|
|
}
|
|
}
|
|
}
|