Exemple #1
0
 public static Ray ReadRay(ref UdpBitStream stream)
 {
     return(new Ray(
                UdpBitStreamExt.ReadVector3(ref stream),
                UdpBitStreamExt.ReadVector3(ref stream)
                ));
 }
Exemple #2
0
 public static Plane ReadPlane(ref UdpBitStream stream)
 {
     return(new Plane(
                UdpBitStreamExt.ReadVector3(ref stream),
                stream.ReadFloat()
                ));
 }
Exemple #3
0
 public static void ReadRigidbody(ref UdpBitStream stream, out Vector3 position, out Quaternion rotation, out Vector3 velocity, out Vector3 angularVelocity)
 {
     position        = UdpBitStreamExt.ReadVector3(ref stream);
     rotation        = UdpBitStreamExt.ReadQuaternion(ref stream);
     velocity        = UdpBitStreamExt.ReadVector3(ref stream);
     angularVelocity = UdpBitStreamExt.ReadVector3(ref stream);
 }
Exemple #4
0
 public static void ReadRigidbody(ref UdpBitStream stream, Rigidbody rigidbody)
 {
     rigidbody.position        = UdpBitStreamExt.ReadVector3(ref stream);
     rigidbody.rotation        = UdpBitStreamExt.ReadQuaternion(ref stream);
     rigidbody.velocity        = UdpBitStreamExt.ReadVector3(ref stream);
     rigidbody.angularVelocity = UdpBitStreamExt.ReadVector3(ref stream);
 }
Exemple #5
0
 public static Bounds ReadBounds(ref UdpBitStream stream)
 {
     return(new Bounds(UdpBitStreamExt.ReadVector3(ref stream), UdpBitStreamExt.ReadVector3(ref stream)));
 }
Exemple #6
0
 public static void ReadTransform(ref UdpBitStream stream, out Vector3 position, out Quaternion rotation)
 {
     position = UdpBitStreamExt.ReadVector3(ref stream);
     rotation = UdpBitStreamExt.ReadQuaternion(ref stream);
 }
Exemple #7
0
 public static void ReadTransform(ref UdpBitStream stream, Transform transform)
 {
     transform.position = UdpBitStreamExt.ReadVector3(ref stream);
     transform.rotation = UdpBitStreamExt.ReadQuaternion(ref stream);
 }