| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, January 21, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class JadeDynastyTowerHintWin : Window |
| | | { |
| | | [SerializeField] Text m_Floor; |
| | | [SerializeField] ItemBehaviour m_Reward; |
| | | [SerializeField] RectTransform m_UnLockEquipPlace; |
| | | [SerializeField] Text m_Description; |
| | | |
| | | JadeDynastyTowerModel model { get { return ModelCenter.Instance.GetModel<JadeDynastyTowerModel>(); } } |
| | | |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | Display(); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | } |
| | | #endregion |
| | | |
| | | private void Display() |
| | | { |
| | | var config = Config.Instance.Get<JadeDynastyTowerConfig>(model.currentFloor); |
| | | m_Floor.text = config.floorName; |
| | | var isLastFloor = model.IsTopFloor(model.currentFloor); |
| | | |
| | | if (isLastFloor && model.currentFloor == model.highestPassFloor) |
| | | { |
| | | m_Reward.gameObject.SetActive(true); |
| | | m_UnLockEquipPlace.gameObject.SetActive(false); |
| | | |
| | | m_Reward.SetItem(config.rewardIdsLevelS[0], config.rewardCountsLevelS[0]); |
| | | } |
| | | else |
| | | { |
| | | var isSpecialFloor = config.unLockEquipPlace > 0; |
| | | if (isSpecialFloor) |
| | | { |
| | | m_UnLockEquipPlace.gameObject.SetActive(true); |
| | | m_Reward.gameObject.SetActive(false); |
| | | m_Reward.SetItem(config.rewardIdsLevelS[0], config.rewardCountsLevelS[0]); |
| | | } |
| | | else |
| | | { |
| | | m_UnLockEquipPlace.gameObject.SetActive(false); |
| | | m_Reward.gameObject.SetActive(true); |
| | | m_Reward.SetItem(config.rewardIdsLevelS[0], config.rewardCountsLevelS[0]); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |