using System; namespace Unity.XR.XREAL.Samples.NetWork { /// Net msg type. public enum MessageType { /// Empty type. None = 0, /// Connect server. Connected = 1, /// Disconnect from server. Disconnect = 2, /// Heart beat. HeartBeat = 3, /// Enter room. EnterRoom = 4, /// Enter room. ExitRoom = 5, /// An enum constant representing the update camera Parameter option. UpdateCameraParam = 6, /// Used to synchronization message with the server. MessageSynchronization = 7, } /// (Serializable) an enter room data. [Serializable] public class EnterRoomData { /// Enter room result. public bool result; } /// (Serializable) an exit room data. [Serializable] public class ExitRoomData { /// Exit room result. public bool Suc; } /// (Serializable) a camera parameter. [Serializable] public class CameraParam { /// Camera fov. public Fov4f fov; } /// (Serializable) a fov 4f. [Serializable] public class Fov4f { /// The left. public double left; /// The right. public double right; /// The top. public double top; /// The bottom. public double bottom; /// Default constructor. public Fov4f() { } /// Constructor. /// A double to process. /// A double to process. /// A double to process. /// A double to process. public Fov4f(double l, double r, double t, double b) { this.left = l; this.right = r; this.top = t; this.bottom = b; } /// Convert this object into a string representation. /// A string that represents this object. public override string ToString() { return string.Format("{0} {1} {2} {3}", left, right, top, bottom); } } }