| | |
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class AllianceBossVictoryWin : DungeonVictoryWin
|
| | | public class AllianceBossVictoryWin : Window
|
| | | {
|
| | | [SerializeField] Transform m_ContainerPoivt;
|
| | | [SerializeField] ButtonEx m_Exit;
|
| | | [SerializeField] Text m_ExitTimer;
|
| | | [SerializeField] Transform m_ContainerTopThree;
|
| | | [SerializeField] Image m_Rank;
|
| | | [SerializeField] Transform m_ContainerOutThree;
|
| | |
| | | [SerializeField] List<DemonJarRewardBehaviour> m_MyItems;
|
| | | [SerializeField] Button m_GotoAuction;
|
| | |
|
| | | float timer = 0f;
|
| | |
|
| | | AllianceBossModel model { get { return ModelCenter.Instance.GetModel<AllianceBossModel>(); } }
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | |
|
| | |
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | base.AddListeners();
|
| | | m_GotoAuction.AddListener(GotoAuction);
|
| | | m_Exit.AddListener(ExitDungeon);
|
| | | }
|
| | |
|
| | | protected override void Display()
|
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | var config = DungeonOpenTimeConfig.Get(dungeonModel.dungeonResult.dataMapID);
|
| | | StartCoroutine(Co_DelayDisplay(config.DelayTime * 0.001f));
|
| | | }
|
| | | else
|
| | | {
|
| | | Display();
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | m_ContainerPoivt.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void LateUpdate()
|
| | | {
|
| | | base.LateUpdate();
|
| | |
|
| | | timer -= Time.deltaTime;
|
| | | if (timer < 0f)
|
| | | {
|
| | | timer += 0.5f;
|
| | | var endTime = dungeonModel.GetCoolDownEndTime(DungeonCoolDownType.LeaveMap);
|
| | | var seconds = (endTime - TimeUtility.ServerNow).TotalSeconds;
|
| | | DrawExitTimer((int)seconds);
|
| | | }
|
| | | }
|
| | |
|
| | | IEnumerator Co_DelayDisplay(float _delay)
|
| | | {
|
| | | yield return new WaitForSeconds(_delay);
|
| | | Display();
|
| | | }
|
| | |
|
| | | void Display()
|
| | | {
|
| | | m_ContainerPoivt.gameObject.SetActive(true);
|
| | | base.RequireDungeonExit();
|
| | | DisplayDungeonExit();
|
| | | DisplayAlliance();
|
| | | DisplayAutionItems();
|
| | | DisplayMyItems();
|
| | | }
|
| | |
|
| | | void DisplayDungeonExit()
|
| | | {
|
| | | var endTime = dungeonModel.GetCoolDownEndTime(DungeonCoolDownType.LeaveMap);
|
| | | var seconds = (endTime - TimeUtility.ServerNow).TotalSeconds;
|
| | | timer = (float)seconds - (int)seconds;
|
| | |
|
| | | DrawExitTimer((int)seconds);
|
| | | }
|
| | |
|
| | | void DrawExitTimer(int seconds)
|
| | | {
|
| | | m_ExitTimer.text = Language.Get("DungeonVictoryWin_Btn_Exit_1", Mathf.Clamp(seconds, 0, int.MaxValue));
|
| | | }
|
| | |
|
| | | void DisplayAlliance()
|
| | |
| | |
|
| | | private void GotoAuction()
|
| | | {
|
| | | WindowCenter.Instance.Open<AuctionHouseWin>(false, 1);
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.FairyAuction);
|
| | | }
|
| | |
|
| | | void ExitDungeon()
|
| | | {
|
| | | dungeonModel.ExitCurrentDungeon();
|
| | | }
|
| | |
|
| | | private void GenerateRewardBehaviour(List<DemonJarRewardBehaviour> rewardBehaviours, Transform _parent, int _needCount)
|