132 lines
4.1 KiB
C#
132 lines
4.1 KiB
C#
/********************************************************************
|
|
文件: 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
|
|
{
|
|
protected override void OnSubscribe()
|
|
{
|
|
string str;
|
|
//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);
|
|
}
|
|
|
|
protected override void OnUnSubscribe()
|
|
{
|
|
//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);
|
|
//}
|
|
|
|
protected override void OnShow()
|
|
{
|
|
_BtnExContinuGame.OnClick.AddListener(() =>
|
|
{
|
|
Debug.Log("点击继续游戏");
|
|
UIManager.Inst.OpenFrame<LoadingFrame>();
|
|
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();
|
|
OpenFrameData openFrameData = new OpenFrameData();
|
|
openFrameData.AddData("SelectIndex", 2);
|
|
UIManager.Inst.OpenFrame<MenuFrame>(openFrameData);
|
|
SceneSystemManager.Inst.LoadScene("DiningCar");
|
|
|
|
});
|
|
|
|
_BtnExStartGame.OnEnter.AddListener(() =>
|
|
{
|
|
|
|
});
|
|
|
|
_BtnExStartGame.OnExit.AddListener(() =>
|
|
{
|
|
});
|
|
|
|
_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(() =>
|
|
{
|
|
CommonTools.TakeScreenshot();
|
|
// Application.Quit();
|
|
// Debug.Log("点击离开游戏");
|
|
});
|
|
|
|
_BtnExExit.OnEnter.AddListener(() =>
|
|
{
|
|
|
|
});
|
|
|
|
_BtnExExit.OnExit.AddListener(() =>
|
|
{
|
|
//_BtnExExit.transform.localScale = _BtnExExit.BaseScale;
|
|
});
|
|
|
|
}
|
|
}
|
|
}
|