| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Thursday, May 23, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class HazyDemonKingRewardWin : Window
|
| | | {
|
| | | [SerializeField] Text m_BossName;
|
| | | [SerializeField] Transform[] m_Stars;
|
| | | [SerializeField] ItemCell[] m_Items;
|
| | |
|
| | | HazyRegionModel model { get { return ModelCenter.Instance.GetModel<HazyRegionModel>(); } }
|
| | | #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
|
| | |
|
| | | void Display()
|
| | | {
|
| | | var config = HazyRegionConfig.Get(model.processingIncidentId);
|
| | | var npcConfig = NPCConfig.Get(config.npcId);
|
| | | m_BossName.text = npcConfig.charName;
|
| | |
|
| | | for (int i = 0; i < m_Stars.Length; i++)
|
| | | {
|
| | | m_Stars[i].gameObject.SetActive(i < config.star);
|
| | | }
|
| | |
|
| | | for (int i = 0; i < m_Items.Length; i++)
|
| | | {
|
| | | m_Items[i].gameObject.SetActive(i < config.reward.Length);
|
| | | if (i < config.reward.Length)
|
| | | {
|
| | | var itemId = config.reward[i];
|
| | | var itemData = new ItemCellModel(itemId, true, 1);
|
| | | m_Items[i].Init(itemData);
|
| | | m_Items[i].button.SetListener(() =>
|
| | | {
|
| | | ItemTipUtility.Show(itemId);
|
| | | });
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|