2023-10-19 15:00:19 +08:00
|
|
|
using Gameplay.Level;
|
2023-08-22 19:08:45 +08:00
|
|
|
using TMPro;
|
|
|
|
|
using Button = UnityEngine.UI.Button;
|
|
|
|
|
using Image = UnityEngine.UI.Image;
|
|
|
|
|
|
|
|
|
|
public class UIDefeatGameController : UIWindow{
|
|
|
|
|
|
|
|
|
|
//UI GameObj
|
|
|
|
|
public Image Image_BG;
|
|
|
|
|
public TMP_Text Text_ChallengeDefeatTItle;
|
|
|
|
|
public Button Button_ReturnMainScene;
|
|
|
|
|
public TMP_Text Text_ReturnMainScene;
|
|
|
|
|
public Button Button_Stronger;
|
|
|
|
|
public TMP_Text Text_Stronger;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Use this for initialization
|
|
|
|
|
public override void OnAwake()
|
|
|
|
|
{
|
|
|
|
|
//bind UI GameObj
|
|
|
|
|
UIDefeatGameBinder.GetComponents(this);
|
|
|
|
|
BindButton(Button_ReturnMainScene, () =>
|
|
|
|
|
{
|
2023-10-19 15:00:19 +08:00
|
|
|
LevelManager.Instance.ExitLevelDirectly();
|
|
|
|
|
});
|
2023-08-22 19:08:45 +08:00
|
|
|
BindButton(Button_Stronger, () =>
|
|
|
|
|
{
|
2023-10-19 15:00:19 +08:00
|
|
|
LevelManager.Instance.ExitLevelDirectly();
|
|
|
|
|
});
|
2023-08-22 19:08:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//invoke when open window
|
|
|
|
|
protected override void OnOpenWindow()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//invoke when reload window
|
|
|
|
|
protected override void OnReloadWindow()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//invoke when close window
|
|
|
|
|
protected override void OnCloseWindow(bool destroy = false)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|