This commit is contained in:
Michał Gdula 2022-05-15 00:03:31 +01:00
parent 90cf5a6112
commit 24501eac1e
13 changed files with 83 additions and 208 deletions

View file

@ -5,24 +5,12 @@ using UnityEngine.SceneManagement;
public class endTrigger : MonoBehaviour
{
private void OnTriggerEnter(Collider other)
private void OnTriggerEnter(Collider other)
{
if (other.gameObject.CompareTag("Player"))
{
if (other.gameObject.CompareTag("Player"))
{
SceneManager.LoadScene("end");
}
}
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
SceneManager.LoadScene("end");
SceneManager.UnloadSceneAsync("game");
}
}
}