Updated dark script

nya it works
This commit is contained in:
Unknown
2022-02-27 00:24:56 -06:00
parent dcc8607ae4
commit 832c866c7e
2 changed files with 6 additions and 3 deletions
+5 -3
View File
@@ -6,6 +6,7 @@ using UnityEngine.SceneManagement;
public class BeatDark : MonoBehaviour
{
public int currentLevel;
public int i = 2;
// Start is called before the first frame update
void Start()
{
@@ -23,11 +24,12 @@ public class BeatDark : MonoBehaviour
public void BeatLevel()
{
if (currentLevel == 3)
if (i == currentLevel && i <=6)
{
PlayerPrefs.SetInt("CurrentLevel", 4);
PlayerPrefs.SetInt("CurrentLevel", i+1);
SceneManager.LoadScene("Real World");
Debug.Log(i);
}
else
{