You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
using UnityEngine; |
|
using System.Collections; |
|
using AX.NetworkSystem; |
|
using AX.Network.Protocols; |
|
using System; |
|
using UnityEngine.UI; |
|
using UnityEngine.SceneManagement; |
|
using System.Net; |
|
|
|
public class PASSWORD_MODIFY_REPLY : NetworkMessageBehaviour |
|
{ |
|
public Text Hint_Text; |
|
protected override void Execute(BinaryMessage message) |
|
{ |
|
Hint_Text.text = "密码修改成功,请重新登录"; |
|
StartCoroutine(WaitSenconds(2f)); |
|
} |
|
|
|
IEnumerator WaitSenconds(float delay) |
|
{ |
|
//NetworkManager.Default.Close(); |
|
//NetworkManager.Default.RemoteEndPoint = GameSetting.LoginSetting.GetLoginAddress(); |
|
//NetworkManager.Default.Start(); |
|
|
|
var ip = default(string); |
|
var port = default(short); |
|
|
|
GameSetting.LoginSetting.GetLoginAddress(out ip, out port); |
|
|
|
NetworkManager.DestroySession(NetworkManager.Default); |
|
NetworkManager.CreateDefaultSession(ip, port); |
|
NetworkManager.Default.Start(); |
|
|
|
|
|
yield return new WaitForSeconds(delay); |
|
|
|
SceneManager.LoadScene(1); |
|
} |
|
}
|
|
|