public static NetBone Read(BinaryReader r) { NetBone b = new NetBone(); b.NextJoint = NetVector.Read(r); b.Type = r.ReadInt32(); return(b); }
public NetFinger(Finger f) { bones = new NetBone[f.bones.Length]; for (int i = 0; i < f.bones.Length; i++) { bones[i] = new NetBone(f.bones[i]); } Type = (int)(f.Type); }
public static NetFinger Read(BinaryReader r) { NetFinger f = new NetFinger(); int count = r.ReadInt32(); if (count > 0) { f.bones = new NetBone[count]; for (int i = 0; i < f.bones.Length; i++) { f.bones[i] = NetBone.Read(r); } } f.Type = r.ReadInt32(); return(f); }
public static void Write(BinaryWriter w, NetFinger f) { if (f.bones == null || f.bones.Length == 0) { w.Write(0); } else { w.Write(f.bones.Length); for (int i = 0; i < f.bones.Length; i++) { NetBone.Write(w, f.bones[i]); } } w.Write(f.Type); }
public static void Write(BinaryWriter w, NetBone b) { NetVector.Write(w, b.NextJoint); w.Write(b.Type); }