//-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Wednesday, February 27, 2019 //-------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace vnxbqy.UI { public class EquipFrameWin : OneLevelWin { protected Image m_LeftTop; protected override void BindController() { base.BindController(); m_LeftTop = this.GetComponent("Pivot/Container_Decorate/Img_LeftTop"); m_LeftTop.SetActive(false); m_Left.SetActive(false); m_Right.SetActive(false); } protected override void OnActived() { base.OnActived(); m_Left.SetActive(false); m_Right.SetActive(false); } protected override void AddListeners() { base.AddListeners(); SetFunctionListener(0, OpenStrengthenWin); SetFunctionListener(1, OpenStarWin); SetFunctionListener(2, OpenTrainWin); SetFunctionListener(3, OpenInlayWin); SetFunctionListener(4, OpenEquipEvolve); } private void OpenStrengthenWin() { CloseSubWindows(); WindowCenter.Instance.Open(); functionOrder = 0; } private void OpenInlayWin() { CloseSubWindows(); WindowCenter.Instance.Open(); functionOrder = 3; } private void OpenTrainWin() { CloseSubWindows(); WindowCenter.Instance.Open(); functionOrder = 2; } private void OpenStarWin() { CloseSubWindows(); WindowCenter.Instance.Open(); functionOrder = 1; } private void OpenEquipEvolve() { CloseSubWindows(); WindowCenter.Instance.Open("EquipEvolveWin"); functionOrder = 4; } public static int GetRedpointFunction() { if (ModelCenter.Instance.GetModel().redpoint.state == RedPointState.Simple) { return 0; } if (ModelCenter.Instance.GetModel().redpoint.state == RedPointState.Simple) { return 3; } if (RedpointCenter.Instance.GetRedpointState(910000) == RedPointState.Simple) { return 2; } if (RedpointCenter.Instance.GetRedpointState(1720000) == RedPointState.Simple) { return 1; } return 0; } } }