Exemple #1
0
 public static void WriteRect(this BasePacket stream, Rect rect)
 {
     stream.WriteFloat(rect.xMin);
     stream.WriteFloat(rect.yMin);
     stream.WriteFloat(rect.width);
     stream.WriteFloat(rect.height);
 }
Exemple #2
0
 public static void WriteQuaternion(this BasePacket stream, Quaternion value)
 {
     stream.WriteFloat(value.x);
     stream.WriteFloat(value.y);
     stream.WriteFloat(value.z);
     stream.WriteFloat(value.w);
 }
Exemple #3
0
 public static void WriteColorRGBA(this BasePacket stream, Color value)
 {
     stream.WriteFloat(value.r);
     stream.WriteFloat(value.g);
     stream.WriteFloat(value.b);
     stream.WriteFloat(value.a);
 }
Exemple #4
0
 public static void WriteVector4(this BasePacket stream, Vector4 value)
 {
     stream.WriteFloat(value.x);
     stream.WriteFloat(value.y);
     stream.WriteFloat(value.z);
     stream.WriteFloat(value.w);
 }
Exemple #5
0
 public static void WriteMatrix4x4(this BasePacket stream, Matrix4x4 m)
 {
     stream.WriteFloat(m.m00);
     stream.WriteFloat(m.m01);
     stream.WriteFloat(m.m02);
     stream.WriteFloat(m.m03);
     stream.WriteFloat(m.m10);
     stream.WriteFloat(m.m11);
     stream.WriteFloat(m.m12);
     stream.WriteFloat(m.m13);
     stream.WriteFloat(m.m20);
     stream.WriteFloat(m.m21);
     stream.WriteFloat(m.m22);
     stream.WriteFloat(m.m23);
     stream.WriteFloat(m.m30);
     stream.WriteFloat(m.m31);
     stream.WriteFloat(m.m32);
     stream.WriteFloat(m.m33);
 }
Exemple #6
0
 public static void WritePlane(this BasePacket stream, Plane plane)
 {
     WriteVector3(stream, plane.normal);
     stream.WriteFloat(plane.distance);
 }