Exemplo n.º 1
0
    private void OnEnable()
    {
#if !UNITY_EDITOR
        try
        {
#endif

        root.SetBindDataSource(PlayerDataManager.Instance.AccountDataModel);
        LoginAssistant.CreateAssistant(transform);


#if !UNITY_EDITOR
    }
    catch (Exception ex)
    {
        Logger.Error(ex.ToString());
    }
#endif
    }
Exemplo n.º 2
0
        private void OnEnable()
        {
#if !UNITY_EDITOR
            try
            {
#endif
            foreach (var system in WorshipAnimation)
            {
                system.gameObject.SetActive(false);
            }

            if (hasRemoveBinding)
            {
                EventDispatcher.Instance.AddEventListener(RankNotifyLogic.EVENT_TYPE, OnRankNotifyLogic);
                EventDispatcher.Instance.AddEventListener(CloseUiBindRemove.EVENT_TYPE, OnCloseUiBindRemove);
                EventDispatcher.Instance.AddEventListener(RankRefreshModelView.EVENT_TYPE, OnRankRefreshModelView);
                EventDispatcher.Instance.AddEventListener(UpdateGiftModelViewEvent.EVENT_TYPE, OnUpdateGiftModelViewEvent);
                var controllerBase = UIManager.Instance.GetController(UIConfig.GiftRankUI);
                if (controllerBase == null)
                {
                    return;
                }
                Binding.SetBindDataSource(controllerBase.GetDataModel(""));
//				var controller = UIManager.Instance.GetController(UIConfig.ShareFrame);
//				Binding.SetBindDataSource(controller.GetDataModel(""));

                if (ModelRoot.Character)
                {
                    ModelRoot.Character.gameObject.SetActive(true);
                }
            }
            hasRemoveBinding = true;

#if !UNITY_EDITOR
        }

        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
#endif
        }
Exemplo n.º 3
0
        private void OnEnable()
        {
        #if !UNITY_EDITOR
            try
            {
        #endif

            var controllerBase = UIManager.Instance.GetController(UIConfig.MissionTip);
            DataModel = controllerBase.GetDataModel("") as MissionTipDataModel;
            BindRoot.SetBindDataSource(DataModel);

        #if !UNITY_EDITOR
        }

        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
        #endif
        }
Exemplo n.º 4
0
        private void Start()
        {
#if !UNITY_EDITOR
            try
            {
#endif
            CellDataModel.PropertyChanged += OnEvent_PropertyChange;
            if (Binding != null)
            {
                Binding.SetBindDataSource(CellDataModel);
            }
#if !UNITY_EDITOR
        }

        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
#endif
        }
Exemplo n.º 5
0
        private void OnEnable()
        {
#if !UNITY_EDITOR
            try
            {
#endif
            EventDispatcher.Instance.DispatchEvent(new MieShiDisappearModelRoot_Event(false));
            SellMessage.SetActive(false);
            UseMessage.SetActive(false);
            var controllerBase = UIManager.Instance.GetController(UIConfig.ItemInfoUI);
            BindRoot.SetBindDataSource(controllerBase.GetDataModel(""));
            isEnable = true;
        #if !UNITY_EDITOR
        }
        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
        #endif
        }
Exemplo n.º 6
0
        private void OnEnable()
        {
        #if !UNITY_EDITOR
            try
            {
        #endif
            if (null != Tab)
            {
                if (PlayerDataManager.Instance.isTaskWildShop)
                {
                    Tab.SetActive(false);
                }
                else
                {
                    Tab.SetActive(true);
                }
            }
            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
        }
Exemplo n.º 7
0
        private void OnEnable()
        {
#if !UNITY_EDITOR
            try
            {
#endif

            if (removeBind)
            {
                var controller = UIManager.Instance.GetController(UIConfig.OperationActivityFrame);
                DataModel = controller.GetDataModel("") as OperationActivityTotalDataModel;
                Binding.SetBindDataSource(DataModel);
                PageBindDataRoot.SetBindDataSource(DataModel.ActivityTermList[DataModel.CurrentSelectPageIdx]);
                EventDispatcher.Instance.AddEventListener(CloseUiBindRemove.EVENT_TYPE, OnCloseUIBindingRemove);
                EventDispatcher.Instance.AddEventListener(OperationActivityPage_Event.EVENT_TYPE, ChangePageEvent);
                EventDispatcher.Instance.AddEventListener(OperationActivitySubPagekEvent.EVENT_TYPE, ChangeSubTableEvent);
                EventDispatcher.Instance.AddEventListener(OperationActivityDrawLotteryEvent.EVENT_TYPE, OnOperationActivityDrawLotteryEvent);
                DataModel.PropertyChanged += OnEventPropertyChanged;
            }
            removeBind = true;

            if (-1 == LotteryIx)
            {
                LotteryCircle.gameObject.SetActive(false);
            }
            else
            {
                LotteryCircle.gameObject.SetActive(true);
                LotteryCircle.localPosition = LotteryRewards[LotteryIx].localPosition;
            }

#if !UNITY_EDITOR
        }

        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
#endif
        }
Exemplo n.º 8
0
        private void OnEnable()
        {
#if !UNITY_EDITOR
            try
            {
#endif
            var controllerBase = UIManager.Instance.GetController(UIConfig.BufferListUI);
            if (controllerBase == null)
            {
                return;
            }
            Binding.SetBindDataSource(controllerBase.GetDataModel(""));

#if !UNITY_EDITOR
        }

        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
#endif
        }
Exemplo n.º 9
0
    private void OnEnable()
    {
#if !UNITY_EDITOR
        try
        {
#endif
        mController = UIManager.Instance.GetController(UIConfig.ClimbingTowerRewardUI);
        if (mController == null)
        {
            return;
        }
        Binding.SetBindDataSource(mController.GetDataModel(""));

#if !UNITY_EDITOR
    }

    catch (Exception ex)
    {
        Logger.Error(ex.ToString());
    }
#endif
    }
Exemplo n.º 10
0
        private void OnEnable()
        {
        #if !UNITY_EDITOR
            try
            {
        #endif

            var controllerBase = UIManager.Instance.GetController(UIConfig.DialogFrame);
            DataModel = controllerBase.GetDataModel("") as DialogueDataModel;
            BindRoot.SetBindDataSource(DataModel);


            DataModel.PropertyChanged += OnEventPropertyChanged;
            CreateCopyObj(DataModel.ModelId);
        #if !UNITY_EDITOR
        }
        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
        #endif
        }
Exemplo n.º 11
0
        // Use this for initialization
        private void Start()
        {
#if !UNITY_EDITOR
            try
            {
#endif
            if (SkillBox == null)
            {
                return;
            }
            BoxDataModel = SkillBox.GetComponent <SkillOutBox>().BoxDataModel;
            //优先查找完成之后再设置隐藏
            RefreshCurrentCount();
            if (BoxDataModel == null)
            {
                return;
            }
            BoxDataModel.PropertyChanged += OnPropertyChangedEvent;
            Binding.SetBindDataSource(BoxDataModel);
            var name = Table.GetSkill(SkillId).Name;
            if (skillName1 == null)
            {
                Logger.Error("talent skillname uilabel is null skillID = {0}", SkillId);
            }
            else
            {
                skillName1.text = name;
            }

#if !UNITY_EDITOR
        }

        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
#endif
        }
Exemplo n.º 12
0
        private void OnEnable()
        {
#if !UNITY_EDITOR
            try
            {
#endif
            //玛雅神器技能说明TIPS特殊处理
            artifactController = UIManager.Instance.GetController(UIConfig.ArtifactUi);
            if (artifactController == null)
            {
                return;
            }
            if (FrameState.Open == artifactController.State)
            {
                gameObject.transform.localPosition = new Vector3(379, 0, 0);
                gameObject.transform.localScale    = new Vector3(0.75f, 0.75f, 0.75f);
            }
            else
            {
                gameObject.transform.localScale = Vector3.one;
            }

            var controllerBase = UIManager.Instance.GetController(UIConfig.EquipSkillTipUI);
            if (controllerBase == null)
            {
                return;
            }
            Binding.SetBindDataSource(controllerBase.GetDataModel(""));

#if !UNITY_EDITOR
        }

        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
#endif
        }
Exemplo n.º 13
0
        private void OnEnable()
        {
        #if !UNITY_EDITOR
            try
            {
#endif
            EventDispatcher.Instance.AddEventListener(ItemInfoMountModelDisplay_Event.EVENT_TYPE, ShowMountModel);
            var controllerBase = UIManager.Instance.GetController(UIConfig.ElfInfoUI);
            if (controllerBase == null)
            {
                return;
            }
            Binding.SetBindDataSource(controllerBase.GetDataModel(""));
            mFlag = true;
        #if !UNITY_EDITOR
        }

        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
        #endif
        }
Exemplo n.º 14
0
    void Start()
    {
#if !UNITY_EDITOR
        try
        {
#endif

        var controllerBase = UIManager.Instance.GetController(UIConfig.NewOfflineExpFrame);
        if (controllerBase == null)
        {
            return;
        }
        Binding.SetBindDataSource(controllerBase.GetDataModel(""));

#if !UNITY_EDITOR
    }

    catch (Exception ex)
    {
        Logger.Error(ex.ToString());
    }
#endif
    }
Exemplo n.º 15
0
        private void OnEnable()
        {
        #if !UNITY_EDITOR
            try
            {
        #endif

            var controllerBase = UIManager.Instance.GetController(UIConfig.MissionFrame);
            DataModel = controllerBase.GetDataModel("") as MissionContentDataModel;
            BindRoot.SetBindDataSource(DataModel);

            DataModel.PropertyChanged += OnEvent_PropertyChanged;
            GenerateFakeModel(DataModel.NpcDataId);
            SetTaskText(DataModel.MissionDialogContent);

        #if !UNITY_EDITOR
        }
        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
        #endif
        }
Exemplo n.º 16
0
        private void OnEnable()
        {
        #if !UNITY_EDITOR
            try
            {
        #endif
            if (deleteBind)
            {
                EventDispatcher.Instance.AddEventListener(CloseUiBindRemove.EVENT_TYPE, OnEvent_CloseUI);
                var controllerBase = UIManager.Instance.GetController(UIConfig.SkillFrameUI);
                if (controllerBase == null)
                {
                    return;
                }
                Binding.SetBindDataSource(PlayerDataManager.Instance.PlayerDataModel.Bags.Resources);
                Binding.SetBindDataSource(PlayerDataManager.Instance.PlayerDataModel.SkillData);
                Binding.SetBindDataSource(PlayerDataManager.Instance.NoticeData);
                Binding.SetBindDataSource(controllerBase.GetDataModel(""));
                Binding.SetBindDataSource(PlayerDataManager.Instance.WeakNoticeData);

                var controller = UIManager.Instance.GetController(UIConfig.ShareFrame);
                Binding.SetBindDataSource(controller.GetDataModel(""));

                //默认选中第一个技能
                //UIEvent_SkillFrame_SkillSelect e = new UIEvent_SkillFrame_SkillSelect();
                //EventDispatcher.Instance.DispatchEvent(e);

                //如果之前打开过天赋描述则关闭
                var logic = gameObject.GetComponentInChildren <TalentPanel>();
                if (null != logic)
                {
                    logic.OnCloseClick();
                }
            }
            deleteBind = true;

        #if !UNITY_EDITOR
        }

        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
        #endif
        }
Exemplo n.º 17
0
        private void OnEnable()
        {
#if !UNITY_EDITOR
            try
            {
#endif
            var controllerBase = UIManager.Instance.GetController(UIConfig.MyArtifactUI);
            if (controllerBase == null)
            {
                return;
            }
            Binding.SetBindDataSource(controllerBase.GetDataModel(""));
            EventDispatcher.Instance.AddEventListener(MyArtifactShowEquipEvent.EVENT_TYPE, OnEvent_ShowModel);

#if !UNITY_EDITOR
        }

        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
#endif
        }
Exemplo n.º 18
0
        private void OnEnable()
        {
        #if !UNITY_EDITOR
            try
            {
        #endif
            var controllerBase = UIManager.Instance.GetController(UIConfig.WishingUI);
            if (controllerBase == null)
            {
                return;
            }
            Binding.SetBindDataSource(controllerBase.GetDataModel("WishData"));
            Binding.SetBindDataSource(controllerBase.GetDataModel("Tree"));
            Binding.SetBindDataSource(controllerBase.GetDataModel("Draw"));
            Binding.SetBindDataSource(PlayerDataManager.Instance.PlayerDataModel);
            Binding.SetBindDataSource(PlayerDataManager.Instance.PlayerDataModel.Bags.Resources);
            Binding.SetBindDataSource(PlayerDataManager.Instance.NoticeData);
            Binding.SetBindDataSource(UIManager.Instance.GetController(UIConfig.ChatMainFrame).GetDataModel(""));

            //EventDispatcher.Instance.AddEventListener(ElfGetDrawResultBack.EVENT_TYPE, DrawAnimationStart);


            //EventDispatcher.Instance.AddEventListener(UIEvent_WishingGetDrawResultBack.EVENT_TYPE, CreateTenPrefab);
            //EventDispatcher.Instance.AddEventListener(UIEvent_WishingTenDrawStop.EVENT_TYPE, TenDrawAnimationStop);
            //EventDispatcher.Instance.AddEventListener(UIEvent_WishingEatAllAnim.EVENT_TYPE, EatAllAnim);
            AnimBoxCollider.SetActive(false);
            for (var i = 0; i < Tips.Count; i++)
            {
                Tips[i].SetActive(false);
            }
        #if !UNITY_EDITOR
        }

        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
        #endif
        }
Exemplo n.º 19
0
        private void Start()
        {
        #if !UNITY_EDITOR
            try
            {
        #endif

            //todo
            var controllerBase = UIManager.Instance.GetController(UIConfig.LevelUpTip);
            if (controllerBase == null)
            {
                return;
            }
            Binding.SetBindDataSource(controllerBase.GetDataModel(""));
            GuideManager.Instance.Skip();
        #if !UNITY_EDITOR
        }

        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
        #endif
        }
Exemplo n.º 20
0
        private void OnEnable()
        {
#if !UNITY_EDITOR
            try
            {
#endif
            EventDispatcher.Instance.AddEventListener(ChickenSceneMapRadar.EVENT_TYPE, OnShowRadar);
            EventDispatcher.Instance.AddEventListener(ChickenSceneMapRemoveRadar.EVENT_TYPE, OnRemoveShowRadar);

            var controllerBase = UIManager.Instance.GetController(UIConfig.ChickenSceneMapUI);
            if (controllerBase == null)
            {
                return;
            }
            Binding.SetBindDataSource(controllerBase.GetDataModel(""));
#if !UNITY_EDITOR
        }

        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
#endif
        }
Exemplo n.º 21
0
        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
        }
Exemplo n.º 22
0
        private void OnEnable()
        {
        #if !UNITY_EDITOR
            try
            {
        #endif
            RuleDesc.gameObject.SetActive(false);
            FightRecord.gameObject.SetActive(false);

            RankHonorList.SetActive(false);
            OpponentList.SetActive(true);
            RuleDesc.SetActive(false);
            if (deleteBind)
            {
                SetVisibleMenu(true);
                var controllerBase = UIManager.Instance.GetController(UIConfig.AreanaUI);
                if (controllerBase == null)
                {
                    return;
                }
                Binding.SetBindDataSource(controllerBase.GetDataModel("Arena"));
                Binding.SetBindDataSource(controllerBase.GetDataModel("Statue"));
                Binding.SetBindDataSource(PlayerDataManager.Instance.NoticeData);
                Binding.SetBindDataSource(PlayerDataManager.Instance.PlayerDataModel);
                Binding.SetBindDataSource(PlayerDataManager.Instance.PlayerDataModel.Bags.Resources);
                Binding.SetBindDataSource(controllerBase.GetDataModel("MultiBattle"));

                EventDispatcher.Instance.AddEventListener(ArenaSatueCellClick.EVENT_TYPE, OnJJCSatueCell);
                EventDispatcher.Instance.AddEventListener(SatueNotifyEvent.EVENT_TYPE, OnNotifySatue);
                EventDispatcher.Instance.AddEventListener(ArenaNotifyLogic.EVENT_TYPE, OnNotifyJJCLogic);
                EventDispatcher.Instance.AddEventListener(UIEvent_ArenaFlyAnim.EVENT_TYPE, JJCFlyAnim);
                EventDispatcher.Instance.AddEventListener(CloseUiBindRemove.EVENT_TYPE, OnCloseRemoveBinding);
            }

        #if !UNITY_EDITOR
        }

        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
        #endif
        }
Exemplo n.º 23
0
        private void ChangeSubTableEvent(IEvent ievent)
        {
            var data = DataModel.ActivityTermList[DataModel.CurrentSelectPageIdx].TableData;

            SubTableBindDataRoot.SetBindDataSource(data.TableList[data.SubTabIdx]);
        }
Exemplo n.º 24
0
        private void OnEnable()
        {
#if !UNITY_EDITOR
            try
            {
#endif
            //EventDispatcher.Instance.AddEventListener(MieShiDisappearModelRoot_Event.EVENT_TYPE, DisappearModelRoot);
            EventDispatcher.Instance.AddEventListener(MieShiRefreshTowers_Event.EVENT_TYPE, RefreshTowers);
            EventDispatcher.Instance.AddEventListener(MieShiAddActvityTime_Event.EVENT_TYPE, UpdateMieshiActivtyTimeList);
            EventDispatcher.Instance.AddEventListener(MieShiUiToggle_Event.EVENT_TYPE, UIToggleClick);
            EventDispatcher.Instance.AddEventListener(MieShiRefreshBoss_Event.EVENT_TYPE, CreateFakeObj);
            if (mRemoveBind)
            {
                EventDispatcher.Instance.AddEventListener(CloseUiBindRemove.EVENT_TYPE, OnCloseUiBindRemove);

                mController = UIManager.Instance.GetController(UIConfig.MonsterSiegeUI);


                if (mController == null)
                {
                    return;
                }

                MonsterModel = mController.GetDataModel("") as MonsterDataModel;
                MonsterModel.PropertyChanged += OnMonsterPropertyChangedEvent;

                Binding.SetBindDataSource(MonsterModel);
                Binding.SetBindDataSource(PlayerDataManager.Instance.PlayerDataModel);
            }
            mRemoveBind = true;
            var main = UIManager.Instance.MainUIFrame.GetComponent <MainScreenFrame>();
            RefreshBtnState();

            //报名时间
            //  MonsterDataModel ad = DataModel.CurMonsterFuben.activity;
            if (MieShiActivityTimeList.Count > 0)
            {
                DateTime time = MieShiActivityTimeList[0];
                if (time != null)
                {
                    DateTime tm  = time.AddMinutes(-(double)(Table.GetMieShiPublic(1).CanApplyTime));
                    DateTime tm2 = time;
                    BaoMingTime.text = string.Format("{0}--{1}", string.Format("{0:yyyy/MM/dd HH:mm}", tm), string.Format("{0:yyyy/MM/dd HH:mm}", tm2));// tm + "--" + tm2;
                }
            }


            int FubenId = MonsterModel.MonsterFubens[0].Fuben.FubenId;
            //MonsterModel.MonsterFubens[0].activity.NeedLevel = Table.GetScene(FubenId).LevelLimit;
            //   MonsterModel.UseDiamond = Table.GetMieShiPublic(1).CostNum;
            //   MonsterModel.UseProp = Table.GetMieShiPublic(1).ItemNum;

#if !UNITY_EDITOR
        }

        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
#endif
        }
Exemplo n.º 25
0
        private void OnEnable()
        {
        #if !UNITY_EDITOR
            try
            {
        #endif

            var controllerBase = UIManager.Instance.GetController(UIConfig.DungeonResult);
            if (controllerBase == null)
            {
                return;
            }
            Binding.SetBindDataSource(controllerBase.GetDataModel(""));
            {
                var __list1      = AwardList;
                var __listCount1 = __list1.Count;
                for (var __i1 = 0; __i1 < __listCount1; ++__i1)
                {
                    var o = __list1[__i1];
                    {
                        o.transform.localRotation = Quaternion.Euler(0, 0, 0);
                        o.GetComponent <BoxCollider>().enabled = true;
                        var tweens = o.GetComponentsInChildren <TweenRotation>(true);
                        {
                            var __array6       = tweens;
                            var __arrayLength6 = __array6.Length;
                            for (var __i6 = 0; __i6 < __arrayLength6; ++__i6)
                            {
                                var position = __array6[__i6];
                                {
                                    position.enabled = false;
                                }
                            }
                        }
                    }
                }
            }
            {
                var __list2      = AwardBack;
                var __listCount2 = __list2.Count;
                for (var __i2 = 0; __i2 < __listCount2; ++__i2)
                {
                    var o = __list2[__i2];
                    {
                        o.gameObject.SetActive(true);
                    }
                }
            }
            {
                var __list3      = AwardFront;
                var __listCount3 = __list3.Count;
                for (var __i3 = 0; __i3 < __listCount3; ++__i3)
                {
                    var o = __list3[__i3];
                    {
                        o.gameObject.SetActive(false);
                    }
                }
            }
            ConfirmBtn.SetActive(false);

            for (var k = 0; k < PaticleLists.Count; k++)
            {
                PaticleLists[k].SetActive(false);
            }

            StartAutoDraw();
        #if !UNITY_EDITOR
        }

        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
        #endif
        }
Exemplo n.º 26
0
 public static void BindDataSourceNoticeData(BindDataRoot dataRoot)
 {
     dataRoot.SetBindDataSource(PlayerDataManager.Instance.NoticeData);
 }
Exemplo n.º 27
0
 public static void BindDataSourcePlayerData(BindDataRoot dataRoot)
 {
     dataRoot.SetBindDataSource(PlayerDataManager.Instance.PlayerDataModel);
 }
Exemplo n.º 28
0
        private void OnEnable()
        {
        #if !UNITY_EDITOR
            try
            {
        #endif
            //OnClickInheritTipClose();
            lockAnimation = false;
            SuccessEffect.gameObject.SetActive(false);
            FailEffect.gameObject.SetActive(false);
            FailItemAni.gameObject.SetActive(false);
            GeneralSuccess.gameObject.SetActive(false);
            JiLianSuccess.gameObject.SetActive(false);

            if (mRemoveBind)
            {
                foreach (var o in OperateFrames)
                {
                    if (o)
                    {
                        o.SetActive(false);
                    }
                }

                EventDispatcher.Instance.AddEventListener(EquipUIPackStart.EVENT_TYPE, OnEquipMentUiPackStart);
                EventDispatcher.Instance.AddEventListener(CloseUiBindRemove.EVENT_TYPE, OnCloseUiBindRemove);

                EventDispatcher.Instance.AddEventListener(EquipUiNotifyLogic.EVENT_TYPE, OnEquipMentUiNotify);
                EventDispatcher.Instance.AddEventListener(EquipUiNotifyRefreshCoumuseList.EVENT_TYPE, OnEquipMentUiRefreshConsumeList);
                EventDispatcher.Instance.AddEventListener(PlaySpriteAnimationEvent.EVENT_TYPE, OnPlaySpriteAnimationEvent);
                EventDispatcher.Instance.AddEventListener(ExcellentEquipEvent.EVENT_TYPE, OnExcellentEquipEvent);

                var controllerBase2 = UIManager.Instance.GetController(UIConfig.SmithyUI);
                if (controllerBase2 != null)
                {
                    BindRoot.SetBindDataSource(controllerBase2.GetDataModel(""));
                }


                var controllerBase = UIManager.Instance.GetController(UIConfig.EquipUI);
                if (controllerBase == null)
                {
                    return;
                }
                BindRoot.SetBindDataSource(controllerBase.GetDataModel(""));
                BindRoot.SetBindDataSource(controllerBase.GetDataModel("EquipPack"));
                BindRoot.SetBindDataSource(PlayerDataManager.Instance.PlayerDataModel);
                BindRoot.SetBindDataSource(PlayerDataManager.Instance.WeakNoticeData);
            }
            mRemoveBind = true;
            mflag       = true;
            //         if (mPack == 0)
            //         {
            //             EquipPack.EquipScroll.SetLookIndex(mStart);
            //         }
            //         else if (mPack == 1)
            //         {
            //             EquipPack.PackScroll.SetLookIndex(mStart);
            //         }
            ResetAttrLayout();
            pack   = -1;
            mStart = -1;

        #if !UNITY_EDITOR
        }

        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
        #endif
        }
Exemplo n.º 29
0
        private void Start()
        {
        #if !UNITY_EDITOR
            try
            {
        #endif
            var controllerBase = UIManager.Instance.GetController(UIConfig.MainUI);
            if (controllerBase == null)
            {
                return;
            }
            Binding.SetBindDataSource(controllerBase.GetDataModel("Radar"));
            Binding.SetBindDataSource(controllerBase.GetDataModel("MainUI"));
            Binding.SetBindDataSource(controllerBase.GetDataModel("SelectTarget"));
            Binding.SetBindDataSource(PlayerDataManager.Instance.PlayerDataModel);
            Binding.SetBindDataSource(PlayerDataManager.Instance.RewardNotice);
            Binding.SetBindDataSource(PlayerDataManager.Instance.PlayerDataModel.SkillData);
            var chatController = UIManager.Instance.GetController(UIConfig.ChatMainFrame);
            Binding.SetBindDataSource(chatController.GetDataModel(""));
            Binding.SetBindDataSource(PlayerDataManager.Instance.NoticeData);
            var missionController = UIManager.Instance.GetController(UIConfig.MissionTrackList);
            Binding.SetBindDataSource(missionController.GetDataModel(""));
            Binding.SetBindDataSource(controllerBase.GetDataModel("DeviceInfo"));
            var teamController = UIManager.Instance.GetController(UIConfig.TeamFrame);
            Binding.SetBindDataSource(teamController.GetDataModel(""));
            var rechargeController = UIManager.Instance.GetController(UIConfig.RechargeFrame);
            Binding.SetBindDataSource(rechargeController.GetDataModel("RechargeDataModel"));
            Binding.SetBindDataSource(PlayerDataManager.Instance.WeakNoticeData);
            var firstChargeController = UIManager.Instance.GetController(UIConfig.FirstChargeFrame);
            if (firstChargeController != null)
            {
                Binding.SetBindDataSource(firstChargeController.GetDataModel(""));
            }

            var activityController = UIManager.Instance.GetController(UIConfig.ActivityUI);
            if (activityController != null)
            {
                Binding.SetBindDataSource(activityController.GetDataModel(""));
            }

            var wingChargeController = UIManager.Instance.GetController(UIConfig.WingChargeFrame);
            if (wingChargeController != null)
            {
                Binding.SetBindDataSource(wingChargeController.GetDataModel(""));
            }

            var rechargeActivityController = UIManager.Instance.GetController(UIConfig.RechargeActivityUI);
            if (rechargeActivityController != null)
            {
                Binding.SetBindDataSource(rechargeActivityController.GetDataModel(""));
            }

            var settingController = UIManager.Instance.GetController(UIConfig.SettingUI);
            if (null != settingController)
            {
                Binding.SetBindDataSource(settingController.GetDataModel(""));
            }

            var operationActivityController = UIManager.Instance.GetController(UIConfig.OperationActivityFrame);
            if (null != operationActivityController)
            {
                Binding.SetBindDataSource(operationActivityController.GetDataModel(""));
            }

            EventDispatcher.Instance.AddEventListener(ShowCountdownEvent.EVENT_TYPE, OnEvent_ShowCountdown);
            EventDispatcher.Instance.AddEventListener(SkillEquipMainUiAnime.EVENT_TYPE, OnEvent_EquipSkillAnim);
            EventDispatcher.Instance.AddEventListener(UIEvent_BuffIncreaseAnimation.EVENT_TYPE, PlayBuffIncreaseAnim);
            EventDispatcher.Instance.AddEventListener(UI_BlockMainUIInputEvent.EVENT_TYPE, OnEvent_BlockMainScreen);
            EventDispatcher.Instance.AddEventListener(SceneTransition_Event.EVENT_TYPE, OnEvent_SceneChange);
            EventDispatcher.Instance.AddEventListener(Event_UpdateMissionData.EVENT_TYPE, OnEvent_UpdateMission);
            EventDispatcher.Instance.AddEventListener(FirstEnterGameEvent.EVENT_TYPE, OnEvent_ShowFirstEnterGame);
            EventDispatcher.Instance.AddEventListener(HiedMieShiIcon_Event.EVENT_TYPE, HiedMieshiIcon);
            EventDispatcher.Instance.AddEventListener(ShowPopTalk_Event.EVENT_TYPE, ShowBossTalk);
            EventDispatcher.Instance.AddEventListener(UIEvent_PlayMainUIBtnAnimEvent.EVENT_TYPE, OnNewFuncionGuideEvent);
            var PkBtnCount0 = PkBtn.Count;
            for (var i = 0; i < PkBtnCount0; i++)
            {
                var btn = PkBtn[i];
                var j   = i;
                btn.onClick.Add(new EventDelegate(() => { ChangePkModel(j); }));
            }

            SetupBufferList();
            //CreateOffineFrame();

            if (null != BlockInputWidget)
            {
                if (BlockInputWidget.gameObject.activeSelf)
                {
                    BlockInputWidget.gameObject.SetActive(false);
                }
            }

            countdownTime = Game.Instance.ServerTime;
            countdownType = eCountdownType.BattleFight;

            //撑大字的纹理
            if (!s_isPretreatString)
            {
                s_isPretreatString = true;
                var txt = ExpLable.GetComponent <UILabel>();
                if (null != txt && null != txt.font && null != txt.font.dynamicFont)
                {
                    txt.font.dynamicFont.RequestCharactersInTexture(GameSetting.Instance.PrepareString);
                }
            }
            IControllerBase monsterController = UIManager.Instance.GetController(UIConfig.MonsterSiegeUI);
            if (monsterController != null)
            {
                MonsterSiegeUIFrameArguments ms = new MonsterSiegeUIFrameArguments();
                ms.Tab = 5;
                monsterController.RefreshData(ms);
                // return;
            }

            EventDispatcher.Instance.DispatchEvent(new MieShiGetInfo_Event());

            var scene = GameLogic.Instance.Scene;
            if (null != scene)
            {
                if (null != scene.TableScene)
                {
                    if (1 == scene.TableScene.IsShowMainUI)
                    {
                        ShowMainButton();
                    }
                    else
                    {
                        HideMainButton();
                    }
                }
            }
#if !UNITY_EDITOR
        }

        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
#endif
        }