//--------------------------------------------------------
|
// [Author]: 第二世界
|
// [ Date ]: Tuesday, January 22, 2019
|
//--------------------------------------------------------
|
|
using System;
|
using System.Collections;
|
using System.Collections.Generic;
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
namespace vnxbqy.UI
|
{
|
|
public class RealmTowerVictoryWin : DungeonVictoryWin
|
{
|
|
[SerializeField] Button m_NextLevel;
|
[SerializeField] Text m_NextLevelTimer;
|
|
RealmModel model { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
|
|
#region Built-in
|
protected override void BindController()
|
{
|
}
|
|
protected override void AddListeners()
|
{
|
m_NextLevel.SetListener(ChallengeNext);
|
m_Exit.SetListener(ExitDungeon);
|
}
|
|
protected override void OnPreOpen()
|
{
|
m_ContainerPoivt.SetActive(false);
|
}
|
|
protected override void OnAfterOpen()
|
{
|
}
|
|
protected override void OnPreClose()
|
{
|
}
|
|
protected override void OnAfterClose()
|
{
|
}
|
#endregion
|
|
protected override void Display()
|
{
|
base.RequireDungeonExit();
|
m_ContainerPoivt.SetActive(true);
|
base.DrawPassTime();
|
base.DrawGetExp();
|
base.DrawItemRewards();
|
base.DrawPassGrade();
|
|
if (model.currentFloor != model.selectFloorID || RealmTowerConfig.Get(model.currentFloor).NeedRealmLV > PlayerDatas.Instance.baseData.realmLevel)
|
{
|
m_NextLevel.SetActive(false);
|
}
|
else
|
{
|
m_NextLevel.SetActive(true);
|
}
|
}
|
|
protected override void DrawExitTimer(int seconds)
|
{
|
if (model.currentFloor != model.selectFloorID || RealmTowerConfig.Get(model.currentFloor).NeedRealmLV > PlayerDatas.Instance.baseData.realmLevel)
|
{
|
m_ExitTimer.text = Language.Get("DungeonVictoryWin_Btn_Exit_1", Mathf.Clamp(seconds, 0, int.MaxValue));
|
}
|
else
|
{
|
m_NextLevelTimer.text = Language.Get("SkyTowerNextLevel", Mathf.Clamp(seconds, 0, int.MaxValue));
|
m_ExitTimer.text = Language.Get("DemonDungeonExit");
|
if (seconds <= 0)
|
{
|
model.RequestRefreshMonster();
|
WindowCenter.Instance.Close<RealmTowerVictoryWin>();
|
}
|
}
|
}
|
|
|
private void ChallengeNext()
|
{
|
model.RequestRefreshMonster();
|
CloseClick();
|
WindowCenter.Instance.Open<RealmTowerHintWin>();
|
Clock.AlarmAfter(2f, () =>
|
{
|
WindowCenter.Instance.Open<DungeonEndCoolDownWin>();
|
});
|
}
|
|
|
}
|
|
}
|
|
|
|
|