public MotionIKData.PosAng?this[int index] { get { switch (index) { case 0: return(new MotionIKData.PosAng?(this.small)); case 1: return(new MotionIKData.PosAng?(this.mediam)); case 2: return(new MotionIKData.PosAng?(this.large)); default: return(new MotionIKData.PosAng?()); } } set { if (!value.HasValue) { return; } switch (index) { case 0: this.small = value.Value; break; case 1: this.mediam = value.Value; break; case 2: this.large = value.Value; break; } } }
public MotionIKData Copy() { MotionIKData motionIkData = new MotionIKData(); int length1 = this.states.Length; motionIkData.states = new MotionIKData.State[length1]; for (int index1 = 0; index1 < length1; ++index1) { MotionIKData.State state1 = new MotionIKData.State(); MotionIKData.State state2 = this.states[index1]; state1.name = state2.name; int length2 = state1.parts.Length; for (int index2 = 0; index2 < length2; ++index2) { MotionIKData.Parts part1 = state1.parts[index2]; MotionIKData.Parts part2 = state2.parts[index2]; part1.param2.sex = part2.param2.sex; part1.param2.target = part2.param2.target; part1.param2.weightPos = part2.param2.weightPos; part1.param2.weightAng = part2.param2.weightAng; part1.param2.blendInfos[0] = new List <MotionIKData.BlendWeightInfo>((IEnumerable <MotionIKData.BlendWeightInfo>)part2.param2.blendInfos[0]); part1.param2.blendInfos[1] = new List <MotionIKData.BlendWeightInfo>((IEnumerable <MotionIKData.BlendWeightInfo>)part2.param2.blendInfos[1]); part1.param3.chein = part2.param3.chein; part1.param3.weight = part2.param3.weight; part1.param3.blendInfos = new List <MotionIKData.BlendWeightInfo>((IEnumerable <MotionIKData.BlendWeightInfo>)part2.param3.blendInfos); } int length3 = state2.frames.Length; state1.frames = new MotionIKData.Frame[length3]; for (int index2 = 0; index2 < length3; ++index2) { MotionIKData.Frame frame1 = new MotionIKData.Frame(); MotionIKData.Frame frame2 = state2.frames[index2]; frame1.frameNo = frame2.frameNo; frame1.editNo = frame2.editNo; int length4 = frame2.shapes.Length; frame1.shapes = new MotionIKData.Shape[length4]; for (int index3 = 0; index3 < length4; ++index3) { MotionIKData.Shape shape1 = new MotionIKData.Shape(); MotionIKData.Shape shape2 = frame2.shapes[index3]; shape1.shapeNo = shape2.shapeNo; for (int index4 = 0; index4 < 3; ++index4) { shape1[index4] = new MotionIKData.PosAng?(new MotionIKData.PosAng()); MotionIKData.PosAng posAng = shape1[index4].Value; for (int index5 = 0; index5 < 3; ++index5) { ((Vector3) ref posAng.pos).set_Item(index5, ((Vector3) ref shape2[index4].Value.pos).get_Item(index5)); } for (int index5 = 0; index5 < 3; ++index5) { ((Vector3) ref posAng.ang).set_Item(index5, ((Vector3) ref shape2[index4].Value.ang).get_Item(index5)); } shape1[index4] = new MotionIKData.PosAng?(posAng); } frame1.shapes[index3] = shape1; } state1.frames[index2] = frame1; } motionIkData.states[index1] = state1; } return(motionIkData); }