mirror of
https://github.com/frizbee19/FebGameJam.git
synced 2026-09-11 08:17:01 +00:00
31 lines
696 B
C#
31 lines
696 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class BeatDark : MonoBehaviour
|
|
{
|
|
public int currentLevel;
|
|
public int i = 2;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
currentLevel = PlayerPrefs.GetInt("CurrentLevel");
|
|
}
|
|
|
|
public void BeatLevel()
|
|
{
|
|
|
|
if (i == currentLevel && i <= 6)
|
|
{
|
|
PlayerPrefs.SetInt("CurrentLevel", i + 1);
|
|
SceneManager.LoadScene("Real World");
|
|
Debug.Log(i);
|
|
}
|
|
else
|
|
{
|
|
SceneManager.LoadScene("Real World");
|
|
}
|
|
}
|
|
}
|