Commit 50a80283 authored by Bošániová Monika's avatar Bošániová Monika
Browse files

highlighting parts of cube in tutorial

parent 91407e8e
This diff is collapsed.
......@@ -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;
}
}
......@@ -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);
}
}
}
......@@ -11,6 +11,8 @@ TagManager:
- R
- O
- W
- Edge
- Corner
layers:
- Default
- TransparentFX
......
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