2024-10-11 10:12:15 +08:00
|
|
|
|
/********************************************************************
|
|
|
|
|
文件: LoginFrame.cs
|
|
|
|
|
作者: 梦语
|
|
|
|
|
邮箱: 1982614048@qq.com
|
|
|
|
|
创建时间: 2024/03/29 17:28:19
|
|
|
|
|
最后修改: 梦语
|
|
|
|
|
最后修改时间: 2024/04/05 16:29:43
|
|
|
|
|
功能: 登录
|
|
|
|
|
*********************************************************************/
|
|
|
|
|
|
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
using UnityEngine.SceneManagement;
|
|
|
|
|
|
|
|
|
|
namespace Ether
|
|
|
|
|
{
|
|
|
|
|
public class LoginFrame : LoginFrameBase
|
|
|
|
|
{
|
2024-10-27 04:03:15 +08:00
|
|
|
|
protected override void OnSubscribe()
|
2024-10-11 10:12:15 +08:00
|
|
|
|
{
|
2024-10-29 18:53:20 +08:00
|
|
|
|
string str;
|
2024-10-11 10:12:15 +08:00
|
|
|
|
//EventCenter.AddListener<EtherInputType, int>(EtherInputType.Up, OnInputUpEvent);
|
|
|
|
|
//EventCenter.AddListener<EtherInputType, int>(EtherInputType.Down, OnInputDownEvent);
|
|
|
|
|
//EventCenter.AddListener<EtherInputType, int>(EtherInputType.Left, OnInputLeftEvent);
|
|
|
|
|
//EventCenter.AddListener<EtherInputType, int>(EtherInputType.Right, OnInputRightEvent);
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-27 04:03:15 +08:00
|
|
|
|
protected override void OnUnSubscribe()
|
2024-10-11 10:12:15 +08:00
|
|
|
|
{
|
|
|
|
|
//EventCenter.RemoveListener<EtherInputType, int>(EtherInputType.Up, OnInputUpEvent);
|
|
|
|
|
//EventCenter.RemoveListener<EtherInputType, int>(EtherInputType.Down, OnInputDownEvent);
|
|
|
|
|
//EventCenter.RemoveListener<EtherInputType, int>(EtherInputType.Left, OnInputLeftEvent);
|
|
|
|
|
//EventCenter.RemoveListener<EtherInputType, int>(EtherInputType.Right, OnInputRightEvent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//private void OnInputUpEvent(int state)
|
|
|
|
|
//{
|
|
|
|
|
// Debug.Log("UpUpUpUpUp:" + state);
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
//private void OnInputDownEvent(int state)
|
|
|
|
|
//{
|
|
|
|
|
// Debug.Log("DownDownDownDown:" + state);
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
//private void OnInputLeftEvent(int state)
|
|
|
|
|
//{
|
|
|
|
|
// Debug.Log("LeftLeftLeft:" + state);
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
//private void OnInputRightEvent(int state)
|
|
|
|
|
//{
|
|
|
|
|
// Debug.Log("RightRightRightRightRight:" + state);
|
|
|
|
|
//}
|
|
|
|
|
|
2024-10-27 04:03:15 +08:00
|
|
|
|
protected override void OnShow()
|
2024-10-11 10:12:15 +08:00
|
|
|
|
{
|
|
|
|
|
_BtnExContinuGame.OnClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
Debug.Log("点击继续游戏");
|
2024-10-27 04:03:15 +08:00
|
|
|
|
UIManager.Inst.OpenFrame<LoadingFrame>();
|
2024-10-11 10:12:15 +08:00
|
|
|
|
SceneSystemManager.Inst.LoadScene("Login");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_BtnExContinuGame.OnEnter.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
_BtnExContinuGame.transform.localScale = _BtnExContinuGame.BaseScale * 1.05f;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_BtnExContinuGame.OnExit.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
_BtnExContinuGame.transform.localScale = _BtnExContinuGame.BaseScale;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_BtnExStartGame.OnClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
Debug.Log("点击新的游戏");
|
|
|
|
|
Close();
|
2024-10-28 01:06:41 +08:00
|
|
|
|
OpenFrameData openFrameData = new OpenFrameData();
|
|
|
|
|
openFrameData.AddData("SelectIndex", 2);
|
|
|
|
|
UIManager.Inst.OpenFrame<MenuFrame>(openFrameData);
|
2024-10-11 10:12:15 +08:00
|
|
|
|
SceneSystemManager.Inst.LoadScene("DiningCar");
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_BtnExStartGame.OnEnter.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
_BtnExStartGame.transform.localScale = _BtnExStartGame.BaseScale * 1.05f;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_BtnExStartGame.OnExit.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
_BtnExStartGame.transform.localScale = _BtnExStartGame.BaseScale;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_BtnExSetting.OnClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
Debug.Log("点击设置");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_BtnExSetting.OnEnter.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
_BtnExSetting.transform.localScale = _BtnExSetting.BaseScale * 1.05f;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_BtnExSetting.OnExit.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
_BtnExSetting.transform.localScale = _BtnExSetting.BaseScale;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_BtnExExit.OnClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
Application.Quit();
|
|
|
|
|
Debug.Log("点击离开游戏");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_BtnExExit.OnEnter.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
_BtnExExit.transform.localScale = _BtnExExit.BaseScale * 1.05f;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_BtnExExit.OnExit.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
_BtnExExit.transform.localScale = _BtnExExit.BaseScale;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|