Message.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /****************************************************************************
  2. * Copyright 2019 Nreal Techonology Limited. All rights reserved.
  3. *
  4. * This file is part of NRSDK.
  5. *
  6. * https://www.nreal.ai/
  7. *
  8. *****************************************************************************/
  9. namespace NRKernal.Experimental.NetWork
  10. {
  11. using System;
  12. /// <summary> Net msg type. </summary>
  13. public enum MessageType
  14. {
  15. /// <summary> Empty type. </summary>
  16. None = 0,
  17. /// <summary> Connect server. </summary>
  18. Connected = 1,
  19. /// <summary> Disconnect from server. </summary>
  20. Disconnect = 2,
  21. /// <summary> Heart beat. </summary>
  22. HeartBeat = 3,
  23. /// <summary> Enter room. </summary>
  24. EnterRoom = 4,
  25. /// <summary> Enter room. </summary>
  26. ExitRoom = 5,
  27. /// <summary> An enum constant representing the update camera Parameter option. </summary>
  28. UpdateCameraParam = 6,
  29. /// <summary> Used to synchronization message with the server. </summary>
  30. MessageSynchronization = 7,
  31. }
  32. /// <summary> (Serializable) an enter room data. </summary>
  33. [Serializable]
  34. public class EnterRoomData
  35. {
  36. /// <summary> Enter room result. </summary>
  37. public bool result;
  38. }
  39. /// <summary> (Serializable) an exit room data. </summary>
  40. [Serializable]
  41. public class ExitRoomData
  42. {
  43. /// <summary> Exit room result. </summary>
  44. public bool Suc;
  45. }
  46. /// <summary> (Serializable) a camera parameter. </summary>
  47. [Serializable]
  48. public class CameraParam
  49. {
  50. /// <summary> Camera fov. </summary>
  51. public Fov4f fov;
  52. }
  53. }