Beispiel #1
0
 public static void WriteRigidbody(ref UdpBitStream stream, Rigidbody rigidbody)
 {
     UdpBitStreamExt.WriteVector3(ref stream, rigidbody.position);
     UdpBitStreamExt.WriteQuaternion(ref stream, rigidbody.rotation);
     UdpBitStreamExt.WriteVector3(ref stream, rigidbody.velocity);
     UdpBitStreamExt.WriteVector3(ref stream, rigidbody.angularVelocity);
 }
Beispiel #2
0
 public static void WritePlane(ref UdpBitStream stream, Plane plane)
 {
     UdpBitStreamExt.WriteVector3(ref stream, plane.normal);
     stream.WriteFloat(plane.distance);
 }
Beispiel #3
0
 public static void WriteRay(ref UdpBitStream stream, Ray ray)
 {
     UdpBitStreamExt.WriteVector3(ref stream, ray.origin);
     UdpBitStreamExt.WriteVector3(ref stream, ray.direction);
 }
Beispiel #4
0
 public static void WriteBounds(ref UdpBitStream stream, Bounds b)
 {
     UdpBitStreamExt.WriteVector3(ref stream, b.center);
     UdpBitStreamExt.WriteVector3(ref stream, b.size);
 }
Beispiel #5
0
 public static void WriteTransform(ref UdpBitStream stream, Transform transform)
 {
     UdpBitStreamExt.WriteVector3(ref stream, transform.position);
     UdpBitStreamExt.WriteQuaternion(ref stream, transform.rotation);
 }