mirror of
https://github.com/frizbee19/FebGameJam.git
synced 2026-10-11 18:19:11 +00:00
Updated dark script
nya it works
This commit is contained in:
1 parent
dcc8607ae4
commit
832c866c7e
2 files changed
+6
-3
No files matched your search
@@ -8580,6 +8580,7 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
currentLevel: 0
|
currentLevel: 0
|
||||||
|
i: 2
|
||||||
--- !u!4 &1810438011
|
--- !u!4 &1810438011
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using UnityEngine.SceneManagement;
|
|||||||
public class BeatDark : MonoBehaviour
|
public class BeatDark : MonoBehaviour
|
||||||
{
|
{
|
||||||
public int currentLevel;
|
public int currentLevel;
|
||||||
|
public int i = 2;
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
@@ -23,11 +24,12 @@ public class BeatDark : MonoBehaviour
|
|||||||
|
|
||||||
public void BeatLevel()
|
public void BeatLevel()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (currentLevel == 3)
|
if (i == currentLevel && i <=6)
|
||||||
{
|
{
|
||||||
PlayerPrefs.SetInt("CurrentLevel", 4);
|
PlayerPrefs.SetInt("CurrentLevel", i+1);
|
||||||
SceneManager.LoadScene("Real World");
|
SceneManager.LoadScene("Real World");
|
||||||
|
Debug.Log(i);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user