示例#1
0
 public Frame()
 {
     part = new Part[16];
     for (int i = 0; i < part.Length; i++)
         part[i] = new Part();
     name = "";
 }
示例#2
0
 public void SetPart(int idx, Part _part)
 {
     part[idx] = _part;
 }
示例#3
0
        private void SwapParts(int idx1, int idx2)
        {
            if (idx1 < 0 || idx2 < 0 ||
                idx1 >= charDef.GetFrame(selFrame).GetPartArray().Length ||
                idx2 >= charDef.GetFrame(selFrame).GetPartArray().Length)
                return;

            Part t = new Part();
            Part i = charDef.GetFrame(selFrame).GetPart(idx1);
            Part j = charDef.GetFrame(selFrame).GetPart(idx2);

            t.idx = i.idx;
            t.location = i.location;
            t.rotation = i.rotation;
            t.scaling = i.scaling;
            t.flip = i.flip;

            i.idx = j.idx;
            i.location = j.location;
            i.rotation = j.rotation;
            i.scaling = j.scaling;
            i.flip = j.flip;

            j.idx = t.idx;
            j.location = t.location;
            j.rotation = t.rotation;
            j.scaling = t.scaling;
            j.flip = t.flip;
        }