Commit 663129f0 authored by Bošániová Monika's avatar Bošániová Monika
Browse files

Level managing

parent 69d23cc4
This diff is collapsed.
This diff is collapsed.
......@@ -48,12 +48,24 @@ public class BegginerSolver
private void GetEdgesFromSecondLayerToDownFace()
{
for (int i = 1; i <= numOfEdgesOnOneFace; i++)
for (int i = 0; i < numOfEdgesOnOneFace; i++)
{
if(cubeMatrix[i].row1[0] == 'U')
for (int j = 1; j <= numOfEdgesOnOneFace; j++)
{
//if(cubeMatrix[])
switch (j)
{
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
break;
}
}
}
}
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using TMPro;
using UnityEngine.UI;
public class LevelManager : MonoBehaviour
{
public Text levelTextOutput;
private void Start()
{
levelTextOutput = GameObject.Find("LevelMessage").GetComponent<Text>();
if(levelTextOutput == null)
print("null");
else
{
print("NOnull");
}
}
internal void loadTo(string levelType)
{
//SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
switch (levelType)
{
case "1":
levelTextOutput.text = "Vitaj v level 1.";
break;
case "2":
levelTextOutput.text = "Vitaj v level 2.";
break;
default:
break;
}
}
}
......@@ -5,6 +5,27 @@ using UnityEngine.SceneManagement;
public class SceneLoader : MonoBehaviour
{
LevelManager levelManager;
private void Start()
{
levelManager = new LevelManager();
}
public void LoadLevel(string levelType)
{
//if(levelManager != null)
// levelManager.loadTo(levelType);
//else
//{
// levelManager = new LevelManager();
// levelManager.loadTo(levelType);
//}
levelManager.loadTo(levelType);
}
public void LoadGame()
{
......
......@@ -8,6 +8,9 @@ EditorBuildSettings:
- enabled: 1
path: Assets/Scenes/Menu.unity
guid: 7370bf8a122c13b4b938642d5cc32e95
- enabled: 1
path: Assets/Scenes/LevelMenu.unity
guid: c16844c85a056e84fa24e6e568564a41
- enabled: 1
path: Assets/Scenes/CubeSolver.unity
guid: 9fc0d4010bbf28b4594072e72b8655ab
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment