Exemple #1
0
        public void Awake()
        {
            m_instance = this;
            //UIEventManager.Instance.RegisterUIEvent(UIEventType.CountDownUI, Show);
            //GameDataManager.Instance.dataEvent.RegisterEvent(DataType.CountDownUI,Show);
//			if(!GameDataManager.Instance.DataIsNull(DataType.CountDownUI))
//			{
//				Show(GameDataManager.Instance.PeekData(DataType.CountDownUI));
//			}
            AddEventHandler(EventTypeEnum.EntityRelive.ToString(), Close);
            //AddEventHandler(EventTypeEnum.EctypeSettleAccount.ToString(), Close);
        }
Exemple #2
0
 void OnDestroy()
 {
     if (IsShow)
     {
         SoundManager.Instance.StopSoundEffect("Sound_UIEff_DeadCountdown");
     }
     m_instance = null;
     //UIEventManager.Instance.RemoveUIEventHandel(UIEventType.CountDownUI, Show);
     //GameDataManager.Instance.dataEvent.RemoveEventHandel(DataType.CountDownUI,Show);
     GameDataManager.Instance.ClearData(DataType.CountDownUI);
     RemoveEventHandler(EventTypeEnum.EntityRelive.ToString(), Close);
     //RemoveEventHandler(EventTypeEnum.EctypeSettleAccount.ToString(), Close);
 }