Exemple #1
0
    public void DeleteLight(LightItem light)
    {
        int deleteindex = orthogons.IndexOf(light);

        for (int i = deleteindex + 1; i < orthogons.Count; i++)
        {
            orthogons[i].transform.position = new Vector3(orthogons[i].transform.position.x, orthogons[i].transform.position.y + 130);
        }

        //try
        //{
        //    ((LightItem)orthogons[deleteindex - 1]).ShowMyconfig();
        //}
        //catch (Exception)
        //{


        //}
        light.transform.parent.GetComponent <RectTransform>().sizeDelta = new Vector2(light.transform.parent.GetComponent <RectTransform>().sizeDelta.x, light.transform.parent.GetComponent <RectTransform>().sizeDelta.y - 130);
        OrthogonBase temp = orthogons[deleteindex];

        orthogons.Remove(orthogons[deleteindex]);
        lineManger.LineList[((LightItem)temp).LineIndex].active = false;
        temp.Delete();
        //if (copyTemp ==light )
        //{
        //    copyTemp
        //}
        if (copyTemp != null)
        {
            copyTemp.Delete();
        }

        animCount--;
    }
Exemple #2
0
 public void Startplay()
 {
     OrthogonBase[] temp = new OrthogonBase[orthogons.Count];
     orthogons.CopyTo(temp);
     startplays = temp.ToList();
 }