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
50a80283
Commit
50a80283
authored
May 13, 2022
by
Bošániová Monika
Browse files
highlighting parts of cube in tutorial
parent
91407e8e
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Assets/Scenes/Tutorial.unity
View file @
50a80283
This diff is collapsed.
Click to expand it.
Assets/Scripts/PieceSelection.cs
View file @
50a80283
...
...
@@ -76,4 +76,6 @@ public class PieceSelection : MonoBehaviour
if
(
sides
.
Contains
(
"D"
)
&&
Down
.
activeSelf
&&
Down
.
GetComponent
<
MeshRenderer
>().
sharedMaterial
.
name
!=
DownMaterialUnselected
.
name
)
Down
.
GetComponent
<
MeshRenderer
>().
sharedMaterial
=
DownMaterialUnselected
;
}
}
Assets/Scripts/PiecesHiding.cs
View file @
50a80283
...
...
@@ -101,4 +101,44 @@ public class PiecesHiding : MonoBehaviour
}
}
public
void
HighlightEdges
()
{
List
<
GameObject
>
objects
=
new
List
<
GameObject
>();
foreach
(
Transform
child
in
transform
)
{
if
(
child
.
tag
==
"Edge"
)
objects
.
Add
(
child
.
gameObject
);
HighlightThese
(
objects
);
}
}
public
void
HighlightCorners
()
{
List
<
GameObject
>
objects
=
new
List
<
GameObject
>();
foreach
(
Transform
child
in
transform
)
{
if
(
child
.
tag
==
"Corner"
)
objects
.
Add
(
child
.
gameObject
);
HighlightThese
(
objects
);
}
}
public
void
HighlightCenters
()
{
List
<
GameObject
>
objects
=
new
List
<
GameObject
>();
foreach
(
Transform
child
in
transform
)
{
if
(
child
.
tag
==
"Centre"
)
objects
.
Add
(
child
.
gameObject
);
HighlightThese
(
objects
);
}
}
}
ProjectSettings/TagManager.asset
View file @
50a80283
...
...
@@ -11,6 +11,8 @@ TagManager:
-
R
-
O
-
W
-
Edge
-
Corner
layers
:
-
Default
-
TransparentFX
...
...
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