IndieGame/client/Assets/Scripts/Frame/Login/LoginFrame.cs

128 lines
4.1 KiB
C#
Raw Normal View History

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
{
protected override void OnSubscribe()
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);
}
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);
//}
protected override void OnShow()
2024-10-11 10:12:15 +08:00
{
_BtnExContinuGame.OnClick.AddListener(() =>
{
Debug.Log("点击继续游戏");
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();
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;
});
}
}
}