Example #1
0
    public void ResetTheCircle()
    {
        for (int i = 0; i < activeLineParts.Count; i++)
        {
            LinePart linePart = activeLineParts[i];

            linePart.Hide();

            inactiveLineParts.Add(linePart);
        }
        activeLineParts.Clear();
    }
Example #2
0
    public void InstantiateTheCircle()
    {
        activeLineParts   = new List <LinePart>();
        inactiveLineParts = new List <LinePart>();

        for (int i = 0; i < 360; i++)
        {
            GameObject go = Instantiate(linePartPrefab, lineParent);
            go.transform.rotation = Quaternion.Euler(Vector3.forward * i);

            LinePart linePart = go.GetComponent <LinePart>();

            linePart.Hide();

            inactiveLineParts.Add(linePart);
        }
    }