Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bošániová Monika
Rubics_cube
Commits
663129f0
Commit
663129f0
authored
Nov 19, 2021
by
Bošániová Monika
Browse files
Level managing
parent
69d23cc4
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Assets/Scenes/CubeSolver.unity
View file @
663129f0
This diff is collapsed.
Click to expand it.
Assets/Scenes/LevelMenu.unity
0 → 100644
View file @
663129f0
This diff is collapsed.
Click to expand it.
Assets/Scripts/BegginerSolver.cs
View file @
663129f0
...
...
@@ -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
;
}
}
}
}
...
...
Assets/Scripts/LevelManager.cs
0 → 100644
View file @
663129f0
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
;
}
}
}
Assets/Scripts/SceneLoader.cs
View file @
663129f0
...
...
@@ -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
()
{
...
...
Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset
View file @
663129f0
This diff is collapsed.
Click to expand it.
ProjectSettings/EditorBuildSettings.asset
View file @
663129f0
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment