This commit is contained in:
parent
e23b558a22
commit
ee340b47fb
|
@ -1 +1 @@
|
|||
172.16.1.156
|
||||
172.16.1.119
|
|
@ -1 +1 @@
|
|||
{"ip":"172.16.1.156","port":54232,"userName":"server1234","passwd":"123456"}
|
||||
{"ip":"172.16.1.119","port":54232,"userName":"server1234","passwd":"123456"}
|
|
@ -80,13 +80,14 @@ public class Judgmentstate : MonoBehaviour
|
|||
_ = SyncCreateRoom.SendMessageAsync(msg);
|
||||
});
|
||||
off_btn.onClick.AddListener(() => {
|
||||
string url = Url_Exit + GlobalFlag.currentUser.login_name;
|
||||
StartCoroutine(GetString(url, data =>
|
||||
{
|
||||
Debug.Log(data);
|
||||
Application.Quit();
|
||||
//string url = Url_Exit + GlobalFlag.currentUser.login_name;
|
||||
//StartCoroutine(GetString(url, data =>
|
||||
//{
|
||||
// Debug.Log(data);
|
||||
|
||||
}));
|
||||
|
||||
//}));
|
||||
Application.Quit();
|
||||
|
||||
});
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ using LitJson;
|
|||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
using static InterfaceManager;
|
||||
public class Login_panl : MonoBehaviour
|
||||
|
@ -23,8 +22,21 @@ public class Login_panl : MonoBehaviour
|
|||
login_btn.onClick.AddListener(Login);
|
||||
TZ();
|
||||
AdamSync.SyncCreateRoom.registRequset += OnRegist;
|
||||
username_input.onEndEdit.AddListener(delegate { OnEndEdit(username_input); });
|
||||
password_input.onEndEdit.AddListener(delegate { OnEndEdit(password_input); });
|
||||
}
|
||||
|
||||
// 当用户提交输入(按下回车键)时调用
|
||||
public void OnEndEdit(InputField field)
|
||||
{
|
||||
// 检查是否是因为按下回车键(或"Enter"键)而提交
|
||||
if (Input.GetKeyDown(KeyCode.Return) || Input.GetKeyDown(KeyCode.KeypadEnter))
|
||||
{
|
||||
//Debug.Log("用户输入并按下了回车键: " + field.text);
|
||||
// 在这里执行你需要的操作
|
||||
Login();
|
||||
}
|
||||
}
|
||||
private void TZ()
|
||||
{
|
||||
if (GameMain.tiao == true)
|
||||
|
@ -109,20 +121,20 @@ public class Login_panl : MonoBehaviour
|
|||
/// <param name="exirOrQuit">返回 退出</param>
|
||||
public void AddGetString(bool exirOrQuit)
|
||||
{
|
||||
string url = Url_Exit + GlobalFlag.currentUser.login_name;
|
||||
StartCoroutine(GetString(url, data =>
|
||||
{
|
||||
Debug.Log(data);
|
||||
if (exirOrQuit)
|
||||
{
|
||||
SceneManager.LoadScene("SampleScene");
|
||||
}
|
||||
else
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
//string url = Url_Exit + GlobalFlag.currentUser.login_name;
|
||||
//StartCoroutine(GetString(url, data =>
|
||||
//{
|
||||
// Debug.Log(data);
|
||||
// if (exirOrQuit)
|
||||
// {
|
||||
// SceneManager.LoadScene("SampleScene");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Application.Quit();
|
||||
// }
|
||||
|
||||
}));
|
||||
//}));
|
||||
}
|
||||
|
||||
public void OnRegist(string msg)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
@ -24,7 +24,8 @@ public class Switchinginput : MonoBehaviour
|
|||
{
|
||||
index = 0;
|
||||
}
|
||||
}
|
||||
_eventSystem.SetSelectedGameObject(inputFields[index].gameObject, new BaseEventDate(_eventSystem));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,13 +119,13 @@ public class Taskpanel : MonoBehaviour
|
|||
});
|
||||
guanji_button.onClick.AddListener(() =>
|
||||
{
|
||||
string url = Url_Exit + GlobalFlag.currentUser.login_name;
|
||||
StartCoroutine(GetString(url, data =>
|
||||
{
|
||||
Debug.Log(data);
|
||||
//string url = Url_Exit + GlobalFlag.currentUser.login_name;
|
||||
//StartCoroutine(GetString(url, data =>
|
||||
//{
|
||||
// Debug.Log(data);
|
||||
// Application.Quit();
|
||||
//}));
|
||||
Application.Quit();
|
||||
}));
|
||||
|
||||
});
|
||||
menu_button.onClick.AddListener(() =>
|
||||
{
|
||||
|
|
|
@ -1037,7 +1037,7 @@ MonoBehaviour:
|
|||
m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
|
||||
m_Text:
|
||||
m_CaretBlinkRate: 0.85
|
||||
m_CaretWidth: 1
|
||||
m_CaretWidth: 5
|
||||
m_ReadOnly: 0
|
||||
--- !u!114 &514598458
|
||||
MonoBehaviour:
|
||||
|
@ -1421,7 +1421,7 @@ MonoBehaviour:
|
|||
m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
|
||||
m_Text:
|
||||
m_CaretBlinkRate: 0.85
|
||||
m_CaretWidth: 1
|
||||
m_CaretWidth: 5
|
||||
m_ReadOnly: 0
|
||||
--- !u!114 &835460218
|
||||
MonoBehaviour:
|
||||
|
|
|
@ -57,12 +57,4 @@ public class AddConfing : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
string url = Url_Exit + GlobalFlag.currentUser.login_name;
|
||||
StartCoroutine(GetString(url, data =>
|
||||
{
|
||||
Debug.Log(data);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -145,7 +145,7 @@ public static class InterfaceManager
|
|||
/// <summary>
|
||||
/// 用户退出
|
||||
/// </summary>
|
||||
public static string Url_Exit { get => IpAddress + "/Handler/User.ashx?action=exit&login_name="; }
|
||||
//public static string Url_Exit { get => IpAddress + "/Handler/User.ashx?action=exit&login_name="; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
Loading…
Reference in New Issue