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,14 +80,15 @@ public class Judgmentstate : MonoBehaviour
|
||||||
_ = SyncCreateRoom.SendMessageAsync(msg);
|
_ = SyncCreateRoom.SendMessageAsync(msg);
|
||||||
});
|
});
|
||||||
off_btn.onClick.AddListener(() => {
|
off_btn.onClick.AddListener(() => {
|
||||||
string url = Url_Exit + GlobalFlag.currentUser.login_name;
|
//string url = Url_Exit + GlobalFlag.currentUser.login_name;
|
||||||
StartCoroutine(GetString(url, data =>
|
//StartCoroutine(GetString(url, data =>
|
||||||
{
|
//{
|
||||||
Debug.Log(data);
|
// Debug.Log(data);
|
||||||
Application.Quit();
|
|
||||||
|
|
||||||
|
//}));
|
||||||
|
Application.Quit();
|
||||||
|
|
||||||
}));
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ using LitJson;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
using UnityEngine.Networking;
|
||||||
using UnityEngine.SceneManagement;
|
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using static InterfaceManager;
|
using static InterfaceManager;
|
||||||
public class Login_panl : MonoBehaviour
|
public class Login_panl : MonoBehaviour
|
||||||
|
@ -23,8 +22,21 @@ public class Login_panl : MonoBehaviour
|
||||||
login_btn.onClick.AddListener(Login);
|
login_btn.onClick.AddListener(Login);
|
||||||
TZ();
|
TZ();
|
||||||
AdamSync.SyncCreateRoom.registRequset += OnRegist;
|
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()
|
private void TZ()
|
||||||
{
|
{
|
||||||
if (GameMain.tiao == true)
|
if (GameMain.tiao == true)
|
||||||
|
@ -109,20 +121,20 @@ public class Login_panl : MonoBehaviour
|
||||||
/// <param name="exirOrQuit">返回 退出</param>
|
/// <param name="exirOrQuit">返回 退出</param>
|
||||||
public void AddGetString(bool exirOrQuit)
|
public void AddGetString(bool exirOrQuit)
|
||||||
{
|
{
|
||||||
string url = Url_Exit + GlobalFlag.currentUser.login_name;
|
//string url = Url_Exit + GlobalFlag.currentUser.login_name;
|
||||||
StartCoroutine(GetString(url, data =>
|
//StartCoroutine(GetString(url, data =>
|
||||||
{
|
//{
|
||||||
Debug.Log(data);
|
// Debug.Log(data);
|
||||||
if (exirOrQuit)
|
// if (exirOrQuit)
|
||||||
{
|
// {
|
||||||
SceneManager.LoadScene("SampleScene");
|
// SceneManager.LoadScene("SampleScene");
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
Application.Quit();
|
// Application.Quit();
|
||||||
}
|
// }
|
||||||
|
|
||||||
}));
|
//}));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnRegist(string msg)
|
public void OnRegist(string msg)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
|
@ -24,7 +24,8 @@ public class Switchinginput : MonoBehaviour
|
||||||
{
|
{
|
||||||
index = 0;
|
index = 0;
|
||||||
}
|
}
|
||||||
|
_eventSystem.SetSelectedGameObject(inputFields[index].gameObject, new BaseEventDate(_eventSystem));
|
||||||
}
|
}
|
||||||
_eventSystem.SetSelectedGameObject(inputFields[index].gameObject, new BaseEventDate(_eventSystem));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,13 +119,13 @@ public class Taskpanel : MonoBehaviour
|
||||||
});
|
});
|
||||||
guanji_button.onClick.AddListener(() =>
|
guanji_button.onClick.AddListener(() =>
|
||||||
{
|
{
|
||||||
string url = Url_Exit + GlobalFlag.currentUser.login_name;
|
//string url = Url_Exit + GlobalFlag.currentUser.login_name;
|
||||||
StartCoroutine(GetString(url, data =>
|
//StartCoroutine(GetString(url, data =>
|
||||||
{
|
//{
|
||||||
Debug.Log(data);
|
// Debug.Log(data);
|
||||||
Application.Quit();
|
// Application.Quit();
|
||||||
}));
|
//}));
|
||||||
|
Application.Quit();
|
||||||
});
|
});
|
||||||
menu_button.onClick.AddListener(() =>
|
menu_button.onClick.AddListener(() =>
|
||||||
{
|
{
|
||||||
|
|
|
@ -1037,7 +1037,7 @@ MonoBehaviour:
|
||||||
m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
|
m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
|
||||||
m_Text:
|
m_Text:
|
||||||
m_CaretBlinkRate: 0.85
|
m_CaretBlinkRate: 0.85
|
||||||
m_CaretWidth: 1
|
m_CaretWidth: 5
|
||||||
m_ReadOnly: 0
|
m_ReadOnly: 0
|
||||||
--- !u!114 &514598458
|
--- !u!114 &514598458
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
@ -1421,7 +1421,7 @@ MonoBehaviour:
|
||||||
m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
|
m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
|
||||||
m_Text:
|
m_Text:
|
||||||
m_CaretBlinkRate: 0.85
|
m_CaretBlinkRate: 0.85
|
||||||
m_CaretWidth: 1
|
m_CaretWidth: 5
|
||||||
m_ReadOnly: 0
|
m_ReadOnly: 0
|
||||||
--- !u!114 &835460218
|
--- !u!114 &835460218
|
||||||
MonoBehaviour:
|
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>
|
||||||
/// 用户退出
|
/// 用户退出
|
||||||
/// </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
|
#endregion
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue