Merge branch 'master' of http://git.umayle.com:2023/yulong/NewN_UAVPlane
This commit is contained in:
commit
cd148c30b5
|
@ -160,9 +160,7 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
private IEnumerator WaitSpawn(string msg)
|
||||
{
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
Debug.Log(msg);
|
||||
string[] data = msg.Split(',');
|
||||
|
||||
switch (data[0])
|
||||
{
|
||||
case "online":
|
||||
|
@ -287,7 +285,7 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
{
|
||||
if (string.IsNullOrWhiteSpace(obj)) return;
|
||||
string[] data = obj.Split(';');
|
||||
Debug.Log("datas=" + data[0]);
|
||||
//Debug.Log("datas=" + data[0]);
|
||||
for (int i = 0; i < data.Length; i++)
|
||||
{
|
||||
int index = i;
|
||||
|
@ -303,9 +301,7 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
userIds.Add(ulong.Parse(userInfo[0]));
|
||||
}
|
||||
}
|
||||
|
||||
SpawnDevice();
|
||||
|
||||
string msg = $"send2room online,{ulong.Parse(GlobalFlag.currentUser.user_id)},{GlobalFlag.currentUser.login_name},{ulong.Parse(GlobalFlag.roomID)}";
|
||||
_ = SyncCreateRoom.SendMessageAsync(msg);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ public static class AsyncWebReq
|
|||
var getRequest = CreateRequest(endpoint);
|
||||
await getRequest.SendWebRequest();
|
||||
#if UNITY_EDITOR
|
||||
Debug.Log("async Get req : " + getRequest.downloadHandler.text);
|
||||
//Debug.Log("async Get req : " + getRequest.downloadHandler.text);
|
||||
#endif
|
||||
T result = JsonUtility.FromJson<T>(getRequest.downloadHandler.text);
|
||||
getRequest.Dispose();
|
||||
|
@ -30,8 +30,8 @@ public static class AsyncWebReq
|
|||
var postRequest = CreateRequest(endpoint, RequestType.POST, payload);
|
||||
await postRequest.SendWebRequest();
|
||||
#if UNITY_EDITOR
|
||||
Debug.Log("async Post req : " + postRequest.downloadHandler.text);
|
||||
Debug.Log("endpoint : " + endpoint);
|
||||
//Debug.Log("async Post req : " + postRequest.downloadHandler.text);
|
||||
//Debug.Log("endpoint : " + endpoint);
|
||||
#endif
|
||||
T result = JsonUtility.FromJson<T>(postRequest.downloadHandler.text);
|
||||
postRequest.Dispose();
|
||||
|
@ -45,7 +45,7 @@ public static class AsyncWebReq
|
|||
{
|
||||
string reqJson = JsonConvert.SerializeObject(data);
|
||||
#if UNITY_EDITOR
|
||||
Debug.Log($"async req json : {reqJson}");
|
||||
//Debug.Log($"async req json : {reqJson}");
|
||||
#endif
|
||||
var bodyRaw = Encoding.UTF8.GetBytes(reqJson);
|
||||
request.uploadHandler = new UploadHandlerRaw(bodyRaw);
|
||||
|
@ -70,7 +70,7 @@ public static class AsyncWebReq
|
|||
yield return request.SendWebRequest();//发送请求
|
||||
if (request.isNetworkError || request.isHttpError)
|
||||
{
|
||||
Debug.Log("cannot get data:" + request.responseCode);
|
||||
//Debug.Log("cannot get data:" + request.responseCode);
|
||||
action(null);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue