コード例 #1
0
        public void CreatePartSet()
        {
            PartSet newPartset = new PartSet();

            newPartset.isActivate = true;
            newPartset.name       = "new Part Set";

            modularSystem.partSetList.Add(newPartset);

            UpdatePartList();
        }
コード例 #2
0
        public void CreateNewPart(PartSet ps)
        {
            Part newPart = new Part();

            newPart.name     = "NewPart[" + ps.partList.Count.ToString() + "]";
            newPart.position = Vector3.zero;
            newPart.rotation = Vector3.zero;
            newPart.scale    = Vector3.one;

            newPart.weight = 0;

            ps.partList.Add(newPart);
        }
コード例 #3
0
        public void DuplicatePartSet(PartSet ps)
        {
            PartSet _ps = new PartSet();

            _ps.attachTransform = ps.attachTransform;
            _ps.isActivate      = ps.isActivate;
            _ps.name            = ps.name;

            foreach (Part item in ps.partList)
            {
                _ps.partList.Add(item);
            }


            modularSystem.partSetList.Add(_ps);

            UpdatePartList();
        }
コード例 #4
0
 public void DeletePart(Part p, PartSet ps)
 {
     ps.partList.Remove(p);
 }
コード例 #5
0
        public void DeletePartSet(PartSet ps)
        {
            modularSystem.partSetList.Remove(ps);

            UpdatePartList();
        }