public void RecycleAllChild() { int tempNum = UsedList.childCount; for (int i = 0; i < tempNum; i++) { Transform temp = UsedList.GetChild(0); temp.GetComponent <CChildProject>().ResetChild(); temp.parent = FreeList; temp.gameObject.SetActive(false); freeNum++; } }
public Transform GetUsedChildTransform(int id) { return(UsedList.GetChild(id)); }
public CChildProject GetNewestChild() { return(UsedList.GetChild(UsedList.childCount - 1).GetComponent <CChildProject>()); }