GMSProxy.cs 746 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using GFGGame;
  8. using UnityEngine.Rendering;
  9. namespace ET
  10. {
  11. public static class GMSProxy
  12. {
  13. public static async ETTask<int> SendGMToServer(string message)
  14. {
  15. M2C_GM response = (M2C_GM)await MessageHelper.SendToServer(new C2M_GM() { message = message });
  16. if (response != null)
  17. {
  18. if (response.Error == ErrorCode.ERR_Success)
  19. {
  20. return ErrorCode.ERR_Success;
  21. }
  22. return response.Error;
  23. }
  24. return ErrorCode.ERR_NetWorkError;
  25. }
  26. }
  27. }