Browse Source

получение logon

Rimmon 4 years ago
parent
commit
8961f77439
2 changed files with 8 additions and 1 deletions
  1. 7 0
      Assets/Scripts/Models/User.cs
  2. 1 1
      Assets/Scripts/Net/Client.cs

+ 7 - 0
Assets/Scripts/Models/User.cs

@@ -28,6 +28,13 @@ public class User
         player.users_load = true;
     }
 
+    public static void LogInOut(byte[] bytedata)
+    {
+        var accid = BitConverter.ToUInt32(bytedata, 1);
+        var cmd = bytedata[5];
+        Debug.Log($"LogInOut accid {accid} cmd {cmd}");
+    }
+
     public static void CoordinatesReceive(byte[] bytedata)
     {
         //var coordleng = bytedata.Length - 11;

+ 1 - 1
Assets/Scripts/Net/Client.cs

@@ -90,7 +90,7 @@ public class Client : MonoBehaviour
         Register(54, Location.ReceiveLocations);
         Register(55, ImageReceive);
         Register(57, Location.TextureGetURL);
-
+        Register(58, User.LogInOut, 6);
 
         //set data path
         //if (Application.platform == RuntimePlatform.WindowsWebPlayer ||