private void OnEnable() { #if !UNITY_EDITOR try { #endif if (removeBind) { EventDispatcher.Instance.AddEventListener(CloseUiBindRemove.EVENT_TYPE, OnCloseUiBindRemove); var data = PlayerDataManager.Instance.GetBag((int)eBagType.Depot); if (data != null) { BindData.SetBindDataSource(data); } if (mBackPack != null) { mBackPack.AddBindEvent(); } } removeBind = true; #if !UNITY_EDITOR } catch (Exception ex) { Logger.Error(ex.ToString()); } #endif }
private void OnEnable() { #if !UNITY_EDITOR try { #endif Attribute.CreateCharacterModel(); if (removeBind) { EventDispatcher.Instance.AddEventListener(CloseUiBindRemove.EVENT_TYPE, OnCloseUIBindingRemove); Binding.SetBindDataSource(PlayerDataManager.Instance.NoticeData); Binding.SetBindDataSource(PlayerDataManager.Instance.WeakNoticeData); var controller = UIManager.Instance.GetController(UIConfig.CharacterUI); Binding.SetBindDataSource(controller.GetDataModel("")); if (backPack) { backPack.AddBindEvent(); } Attribute.AddEvent(); } backPack.UnlockFrame.gameObject.SetActive(false); removeBind = true; //临时加在这里,以后要把打开商店界面的from定义一下再处理 PlayerDataManager.Instance.isTaskWildShop = false; #if !UNITY_EDITOR } catch (Exception ex) { Logger.Error(ex.ToString()); } #endif }
private void OnEnable() { #if !UNITY_EDITOR try { #endif if (isDeleteBind) { EventDispatcher.Instance.AddEventListener(CloseUiBindRemove.EVENT_TYPE, OnEvent_CloseUI); var control = UIManager.Instance.GetController(UIConfig.StoreUI); BindData.SetBindDataSource(control.GetDataModel("")); if (theBag) { theBag.AddBindEvent(); } } isDeleteBind = true; #if !UNITY_EDITOR } catch (Exception ex) { Logger.Error(ex.ToString()); } #endif }
private void OnEnable() { #if !UNITY_EDITOR try { #endif if (mRemoveBind) { EventDispatcher.Instance.AddEventListener(CloseUiBindRemove.EVENT_TYPE, OnCloseUiBindRemove); EventDispatcher.Instance.AddEventListener(UIEvent_TradingFlyAnim.EVENT_TYPE, OnTradingFlyAnim); var controllerBase = UIManager.Instance.GetController(UIConfig.TradingUI); if (controllerBase == null) { return; } Binding.SetBindDataSource(controllerBase.GetDataModel("TradingDataModel")); Binding.SetBindDataSource(PlayerDataManager.Instance.PlayerDataModel.Bags.Resources); Binding.SetBindDataSource(PlayerDataManager.Instance.NoticeData); BackPackForTrading.AddBindEvent(); } #if !UNITY_EDITOR } catch (Exception ex) { Logger.Error(ex.ToString()); } #endif }
private void OnEnable() { #if !UNITY_EDITOR try { #endif Attribute.CreateCharacterModel(); if (removeBind) { EventDispatcher.Instance.AddEventListener(CloseUiBindRemove.EVENT_TYPE, OnCloseUIBindingRemove); Binding.SetBindDataSource(PlayerDataManager.Instance.NoticeData); Binding.SetBindDataSource(PlayerDataManager.Instance.WeakNoticeData); var controller = UIManager.Instance.GetController(UIConfig.ShareFrame); Binding.SetBindDataSource(controller.GetDataModel("")); if (backPack) { backPack.AddBindEvent(); } Attribute.AddEvent(); } removeBind = true; #if !UNITY_EDITOR } catch (Exception ex) { Logger.Error(ex.ToString()); } #endif }
private void CreateBackPack() { var objres = ResourceManager.PrepareResourceSync <GameObject>("UI/BackPack.prefab"); var obj = Instantiate(objres) as GameObject; if (null != BackPackRoot) { var objTransform = obj.transform; //objTransform.parent = BackPackRoot; objTransform.SetParentEX(BackPackRoot); objTransform.localScale = Vector3.one; objTransform.localPosition = Vector3.zero; obj.SetActive(true); mBackPack = obj.GetComponent <BagFrame>(); if (mBackPack) { mBackPack.AddBindEvent(); } } }
private void OnEnable() { #if !UNITY_EDITOR try { #endif GameObject tab = transform.FindChildRecursive("tab").gameObject; if (null != tab) { tab.SetActive(true); } if (PlayerDataManager.Instance.isTaskWildShop) { tab.SetActive(false); } if (isDeleteBind) { EventDispatcher.Instance.AddEventListener(CloseUiBindRemove.EVENT_TYPE, OnEvent_CloseUI); var control = UIManager.Instance.GetController(UIConfig.StoreUI); BindData.SetBindDataSource(control.GetDataModel("")); if (theBag) { theBag.AddBindEvent(); } } isDeleteBind = true; #if !UNITY_EDITOR } catch (Exception ex) { Logger.Error(ex.ToString()); } #endif }