39 lines
1018 B
C#
39 lines
1018 B
C#
using UnityEngine;
|
|
using TMPro;
|
|
using UnityEngine.UI;
|
|
using System.Collections.Generic;
|
|
using CSNetwork.Protocols.RPCData;
|
|
|
|
public class ScreenLogin : MonoBehaviour
|
|
{
|
|
[SerializeField] private TMP_InputField ifUsername;
|
|
[SerializeField] private TMP_InputField ifPassword;
|
|
[SerializeField] private TMP_Dropdown ip;
|
|
[SerializeField] private Button btnLogin;
|
|
[SerializeField] private CanvasController canvasController;
|
|
|
|
private void Start()
|
|
{
|
|
btnLogin.onClick.AddListener(OnClickBtnLogin);
|
|
}
|
|
|
|
private void OnClickBtnLogin()
|
|
{
|
|
string _username = ifUsername.text;
|
|
string _password = ifPassword.text;
|
|
string _ip = ip.options[ip.value].text;
|
|
Debug.LogError("Login...");
|
|
}
|
|
|
|
private void HandleLoginComplete(List<RoleInfo> roleInfos)
|
|
{
|
|
Debug.LogError("Success");
|
|
canvasController.ShowScreenSelectCharacter(roleInfos);
|
|
}
|
|
|
|
private void HandleLoginFaile(string reslut)
|
|
{
|
|
Debug.LogError(reslut);
|
|
}
|
|
}
|