Beispiel #1
0
    public void Del(int ID)
    {
        if (ID == 0)
        {
            return;
        }
        Destroy(transform.Find("Viewport/Content/obj" + ID).gameObject);
        Destroy(transform.Find("TipTitleX/Viewport/Content/obj" + ID).gameObject);

        for (int i = ID + 1; i <= Length; i++)
        {
            transform.Find("TipTitleX/Viewport/Content/obj" + i).GetComponent <CommonAssist>().ID = i - 1;
            transform.Find("Viewport/Content/obj" + i).name           = "obj" + (i - 1);
            transform.Find("TipTitleX/Viewport/Content/obj" + i).name = "obj" + (i - 1);
            talentStoneConditions[ID] = talentStoneConditions[i];
        }
        talentStoneConditions.Remove(Length);
        print("集合长度=" + talentStoneConditions.Count);
        Length -= 1;
        DataManage.DelTalentStoneConditionDate(ID);
        WindowControl.SetConsole("删除成功");
        //transform.parent.Find("Console/Text").GetComponent<Text>().text = "删除成功-----------------时间" + DateTime.Now.ToString();
    }