using UnityEngine;
using UnityEngine.SceneManagement;
public class nextlvl : MonoBehaviour
{
int LevelComplete;
private void OnTriggerEnter(Collider ball)
{
if(LevelComplete == 1)
{
LevelComplete = PlayerPrefs.SetInt("LevelComplete",1);
SceneManager.LoadScene("lvl 1");
}
else
{
SceneManager.LoadScene("lvl 1");
}
}
void Start()
{
LevelComplete = PlayerPrefs.GetInt("LevelComplete");
}
}