Esempio n. 1
0
        public SoftGuideInfo(int id, bool isTipOver)
        {
            this.id        = id;
            data           = FunctionData.GetFunctionDataByID(id);
            this.isTipOver = isTipOver;
            if (string.IsNullOrEmpty(data.show_main_position))
            {
                hasFirstView = false;
            }
            else
            {
                hasFirstView = true;
                string[] mainPos = data.show_main_position.Split('#');
                firstViewPath   = mainPos[0];
                firstButtonPath = mainPos[1];
            }

            if (string.IsNullOrEmpty(data.show_sheet_position))
            {
                hasSecondView = false;
            }
            else
            {
                hasSecondView = true;
                string[] mainPos = data.show_sheet_position.Split('#');
                SecondViewPath   = mainPos[0];
                SecondButtonPath = mainPos[1];
            }
        }
Esempio n. 2
0
        private void Refresh()
        {
            FunctionData data = FunctionData.GetFunctionDataByID(id);
            //蛋疼的策划特殊处理
            SoftGuideInfo info = new SoftGuideInfo(id, false);

            if ("ui/pve_embattle/pve_embattle_view_lua".Equals(info.firstViewPath))
            {
                goLock.SetActive(false);
                goLockSmall.SetActive(status == StatusType.Lock);
            }
            else
            {
                goLock.SetActive(status == StatusType.Lock);
                goLockSmall.SetActive(false);
            }

            if (data.is_show_light)
            {
                goEffectTip.SetActive(status != StatusType.Lock);
            }
            else
            {
                goEffectTip.SetActive(false);
            }
            //0 不处理 1 是否显示隐藏,2显隐and是否有动画(2为主界面专用)
            if (data.show_animation_status == 1)
            {
                transform.parent.gameObject.SetActive(status != StatusType.Lock);
            }
        }
Esempio n. 3
0
        private void Refresh(int id)
        {
            root.SetActive(true);
            CommonFadeToAnimation.Get(root).init(0, 1, 0.2f);
            FunctionData data = FunctionData.GetFunctionDataByID(id);

            textName.text = Localization.Get(data.show_new_des);
            imgIcon.SetSprite(ResMgr.instance.Load <Sprite>(data.show_new_pic));
        }
Esempio n. 4
0
    private void Refresh()
    {
        int id    = 0;
        int index = 0;

        for (int i = 0, count = transformList.Count; i < count; i++)
        {
            id = (int)functionOpenList[i];

            if (_curOpenIdDic.ContainsKey(id))
            {
                transformList[i].gameObject.SetActive(false);
                continue;
            }

            FunctionData data = FunctionData.GetFunctionDataByID(id);

            if (!FunctionOpenProxy.instance.IsFunctionOpen(functionOpenList[i])) //未开放
            {
                if (data.show_animation_status == 0)                             //正常显示
                {
                    transformList[i].localPosition = originPositionDic[index];
                    index++;
                }
                else
                {
                    transformList[i].localPosition = originPositionDic[i];
                    transformList[i].gameObject.SetActive(false);
                }
            }
            else             //开放
            {
                transformList[i].gameObject.SetActive(true);
                transformList[i].localPosition = originPositionDic[index];
                index++;
            }
        }
        if (_curOpenIdDic.Count > 0)
        {
            StartCoroutine(StartAnimationCoroutine());
        }
        else
        {
            _isExecute = false;
        }
    }
        void Start()
        {
            titleText.text = Localization.Get("ui.multple_fight_view.center" + (int)centerType);
            FunctionData data = FunctionData.GetFunctionDataByID(openType);

            if (data == null)
            {
                unlockLevelText.gameObject.SetActive(false);
                unlockGo.SetActive(false);
                unlockTipsFrameGO.SetActive(false);
            }
            else
            {
                if (data.player_level > 0)
                {
                    unlockLevelText.text = string.Format(Localization.Get("ui.multple_fight_view.unlock"), data.player_level);
                }
                else
                {
                    DungeonInfo info = DungeonProxy.instance.GetDungeonInfo(data.dungeon_pass);
                    if (info == null)
                    {
                        unlockLevelText.text = "副本不存在该";
                    }
                    else
                    {
                        if (info.star <= 0)
                        {
                            unlockLevelText.text = string.Format(Localization.Get("ui.function_open.dungeon_not_pass_cshap"), info.dungeonData.GetDungeonTypeName(), info.dungeonData.GetOrderName(), info.dungeonData.GetDungeonName());
                        }
                    }
                }

                bool isOpen = FunctionOpenProxy.instance.IsFunctionOpen(openType);
                unlockGo.SetActive(!isOpen);
                unlockLevelText.gameObject.SetActive(!isOpen);
                unlockTipsFrameGO.SetActive(!isOpen);
            }
            if (openTimeText != null)
            {
                if (centerType == MultipleFightCenterType.FightCenter_WorldBoss)
                {
                    System.DateTime time1      = GlobalData.GetGlobalData().boss_time1_fight_began;
                    System.DateTime time1End   = time1.AddSeconds(GlobalData.GetGlobalData().bossFightLastTime);
                    string          startTime1 = string.Format(Localization.Get("ui.multple_fight_view.dailyTime"), time1.ToString("HH:mm"), time1End.ToString("HH:mm"));
                    System.DateTime time2      = GlobalData.GetGlobalData().boss_time2_fight_began;
                    System.DateTime time2End   = time2.AddSeconds(GlobalData.GetGlobalData().bossFightLastTime);
                    string          startTime2 = string.Format(Localization.Get("ui.multple_fight_view.dailyTime"), time2.ToString("HH:mm"), time2End.ToString("HH:mm"));
                    openTimeText.text = startTime1 + "\n" + startTime2;
                }
                else if (centerType == MultipleFightCenterType.FightCenter_PvpRace)
                {
                    System.DateTime time1     = GlobalData.GetGlobalData().point_pvp_start_time;
                    System.DateTime time1End  = time1.AddSeconds(GlobalData.GetGlobalData().point_pvp_keep_time);
                    string          startTime = string.Format(Localization.Get("ui.multple_fight_view.specailOpenTime"), time1.ToString("HH:mm"), time1End.ToString("HH:mm"));
                    openTimeText.text = startTime;
                }
            }


            if (centerType == MultipleFightCenterType.FightCenter_WorldBoss)
            {
                if (Logic.WorldBoss.Model.WorldBossProxy.instance.IsOpen)
                {
                    StartWorldBossCountDown();
                }
                else
                {
                    StopWorldBossCountDown();
                }
            }
        }