| //-------------------------------------------------------- | 
| //    [Author]:           第二世界 | 
| //    [  Date ]:           Sunday, April 08, 2018 | 
| //-------------------------------------------------------- | 
|   | 
| using System; | 
| using System.Collections; | 
| using System.Collections.Generic; | 
| using UnityEngine; | 
| using UnityEngine.UI; | 
|   | 
| namespace vnxbqy.UI  | 
| { | 
|   | 
|     public class DungeonAncientAchieveWin : Window | 
|     { | 
|         [SerializeField] Button m_Close; | 
|         [SerializeField] AchieveTargetBehaviour m_AchieveTargetBehaviour; | 
|         #region Built-in | 
|         protected override void BindController() | 
|         { | 
|         } | 
|   | 
|         protected override void AddListeners() | 
|         { | 
|             m_Close.onClick.AddListener(CloseClick); | 
|         } | 
|   | 
|         protected override void OnPreOpen() | 
|         { | 
|             m_AchieveTargetBehaviour.Init(31160);  | 
|             MainPositionTween.switchFunctionStateEvent += OnChangeFuncBtnPosEvent; | 
|         } | 
|   | 
|         protected override void OnAfterOpen() | 
|         { | 
|         } | 
|   | 
|         protected override void OnPreClose() | 
|         {  | 
|             MainPositionTween.switchFunctionStateEvent -= OnChangeFuncBtnPosEvent; | 
|         }  | 
|   | 
|         protected override void OnAfterClose() | 
|         { | 
|         }  | 
|   | 
|         #endregion | 
|         private void OnChangeFuncBtnPosEvent(bool immedidately)  | 
|         {  | 
|             if (!MainPositionTween.isDefaultState)  | 
|             {  | 
|                 CloseImmediately();  | 
|             }  | 
|         } | 
|   | 
|     } | 
|   | 
| } |