Exemple #1
0
 public void DataReset()
 {
     U_List.ClearList <Transform>(children, moveTrans);
     U_List.ClearList <string>(childrenNames, moveNames);
     U_List.ClearList <Vector3>(oriPosList, tarPosList);
     U_List.ClearList <int>(orderList);
     U_List.ClearList <FellowInstall>(elements, toMoveList);
 }
Exemple #2
0
 void SetNowTrans_Aft()
 {
     if (null == movingTrans)
     {
         movingTrans = new List <Transform>();
     }
     U_List.ClearList(movingTrans);
 }
Exemple #3
0
        public void RemoveData()
        {
            groupCount   = 0;
            allStepCount = 0;
            U_List.ClearList(brother, oriTrans_Obj, oriTrans_AllStep, tarTrans_AllStep);
            U_List.ClearList(assembles_Obj);
            U_List.ClearList(eachGroupCount);
            U_List.ClearList(oriGroupList, tarGroupList);
            U_List.ClearList(casGroupList);

            U_Component.RemoveChildrenComponents <C_AssembleOBJ>(transform, true, true);
        }
Exemple #4
0
 void SetNowTrans_Pre(int groupIndex)
 {
     if (null == movingTrans)
     {
         movingTrans = new List <Transform>();
     }
     if (state == General_State.一步拆ing || state == General_State.一步装ing)
     {
         U_List.ClearList(movingTrans);
     }
     else
     {
         movingTrans = U_List.CopyList(oriGroupList[groupIndex]);
     }
 }
Exemple #5
0
        void GetMoveTransAndNameList(string mark)
        {
            U_List.ClearList(children, moveTrans);
            U_List.ClearList(childrenNames, moveNames);
            GetChildren();
            GetChildrenName();

            foreach (Transform trans in children)
            {
                if (U_String.JudeLastContain(trans.name, mark, 5))
                {
                    moveTrans.Add(trans);
                    moveNames.Add(trans.name);
                }
            }
        }
Exemple #6
0
        public IEnumerator C_Order()
        {
            if (groupIndex >= groupCount)
            {
                groupIndex = groupCount; state = General_State.拆完;
            }

            switch (state)
            {
            case General_State.拆完: chai_OneKeyAll = false; chaiFlag_OneKeyAll = false; U_List.ClearList(movingTrans); yield break;

            case General_State.装完: groupIndex = 0; break;

            case General_State.单装到一半: groupIndex += 1; break;
            }
            state = General_State.一键分步拆ing;
            allow = Allow.只能一键拆;

            for (int i = groupIndex; i < groupCount; i++)
            {
                if (allow == Allow.只能一键拆)
                {
                    C_Group(groupIndex);
                    SetNowTrans_Pre(groupIndex);
                }
                yield return(new WaitForSeconds(duration * fellowRate));

                if (allow == Allow.只能一键拆)
                {
                    if (null != Chai_Group_Complete)
                    {
                        Chai_Group_Complete.Invoke(groupIndex);
                    }
                    groupIndex += 1;
                    SetNowTrans_Aft();
                }
            }
            if (allow == Allow.只能一键拆)
            {
                state          = General_State.拆完; allow = Allow.无限制;
                chai_OneKeyAll = false; chaiFlag_OneKeyAll = false;
            }
        }