Esempio n. 1
0
        private void OnServerTimeFixed(bool success)
        {
            var panels = m_Panels.Values.ToArray();

            foreach (var p in panels)
            {
                p.OnServerTimeFixed(success);
            }

            if (success)
            {
                NetOpenBuffer buffer;
                while (m_NetOpenBufferQueue.Count > 0)
                {
                    if ((buffer = m_NetOpenBufferQueue.Dequeue()) != null)
                    {
                        OpenPanelImp(buffer.info, buffer.panelName, buffer.args);
                    }
                }
            }
            else
            {
                if (m_NetOpenBufferQueue.Count > 0)
                {
                    Global.gApp.gMsgDispatcher.Broadcast(MsgIds.ShowGameTipsByStr, LanguageMgr.GetText("Active_Award_No_Network"));
                    m_NetOpenBufferQueue.Clear();
                }
            }
            ClosePanel(Wndid.LoadingUI);
        }
Esempio n. 2
0
        public void ShowCard()
        {
            var cardData = cardList[cardIdx];

            if (cardData.isNew)
            {
                int beforeCardCount = PlayerDataMgr.singleton.GetCollectCardCount() - newCardCount;
                newCardCount--;
                int afterCardCount = PlayerDataMgr.singleton.GetCollectCardCount() - newCardCount;
                IdleBeforeTxt.text.text        = LanguageMgr.GetText("ShopTab_Box_TimeText", IdleRewardMgr.singleton.GetMaxIdleHour(beforeCardCount));
                IdleAfterTxt.text.text         = LanguageMgr.GetText("ShopTab_Box_TimeText", IdleRewardMgr.singleton.GetMaxIdleHour(afterCardCount));
                CampOfflineBeforeTxt.text.text = LanguageMgr.GetText("ShopTab_Box_TimeText", CampsiteMgr.singleton.GetMaxOfflineHour(beforeCardCount));
                CampOfflineAfterTxt.text.text  = LanguageMgr.GetText("ShopTab_Box_TimeText", CampsiteMgr.singleton.GetMaxOfflineHour(afterCardCount));
                NewCardInfo.gameObject.SetActive(true);
            }

            index++;


            boxCount--;
            BoxCountTxt.text.text = boxCount.ToString();

            TipsTxt.gameObject.SetActive(true);
            ClickObj.gameObject.SetActive(true);
            flyCard = false;
        }
Esempio n. 3
0
        public void BoradCast(UIEventType type, object parameter = null)
        {
            if (type == UIEventType.SERVER_TIME)
            {
                if (waitNetWindow != null)
                {
                    var success = (bool)parameter;
                    if (success)
                    {
                        waitNetWindow.Open();
                        windows.Add(waitNetWindow);
                    }
                    else
                    {
                        TipsUI.Instance.ShowTip(new TipsInfo()
                        {
                            autoClose = true,
                            duration  = 1f,
                            openMask  = false,
                            tipStr    = LanguageMgr.GetText("Active_Award_No_Network")
                        });
                        Close(waitNetWindow);
                    }
                    waitNetWindow = null;
                }
            }

            for (int i = windows.Count - 1; i >= 0; i--)
            {
                var win = windows[i];
                win.OnEvent(type, parameter);
            }
        }
        void InitData()
        {
            cardData = PlayerDataMgr.singleton.GetGunCardData(gunCardRes.id);
            if (cardData == null)
            {
                return;
            }

            var curStarRes = TableMgr.singleton.CardStarTable.GetItemByID(cardData.star - 1);

            if (curStarRes == null)
            {
                return;
            }

            GunName.text.text = LanguageMgr.GetText(gunCardRes.tid_name);;

            //IconBtn.image.sprite = Resources.Load(gunCardRes.icon, typeof(Sprite)) as Sprite;

            StarTxt.text.text = (curStarRes.star).ToString();

            //StartCoroutine(ChangeValue(countTxt, data.toCount, 0));


            isLock = true;
            Invoke("LvUpData", 1.13f);
        }
Esempio n. 5
0
        private void ShowStars(List <int> starList)
        {
            if (starList == null)
            {
                return;
            }

            var lvRes = TableMgr.singleton.LevelTable.GetItemByID(PlayerDataMgr.singleton.EnterStageID);

            if (lvRes == null)
            {
                return;
            }


            for (int i = 0; i < lvRes.starList.Length; ++i)
            {
                var res = TableMgr.singleton.LevelStarRateTable.GetItemByID(lvRes.starList[i]);
                if (res == null)
                {
                    return;
                }

                starTextList[i].text = LanguageMgr.GetText(res.tid_name, lvRes.cardLevel);

                if (starList.Contains(res.id))
                {
                    curStarList[i].SetActive(true);
                }
                else
                {
                    curStarList[i].SetActive(false);
                }
            }
        }
Esempio n. 6
0
 public override void Init <T>(string name, UIInfo info, T arg)
 {
     base.Init(name, info, arg);
     descTxt.text       = LanguageMgr.GetText("QuickPage_Text_Desc", IdleRewardMgr.QUICK_IDLE_MINUTES / 60);
     rewardGoldTxt.text = IdleRewardMgr.singleton.GetQuickIdleRewardGold().ToSymbolString(); //string.Format("{0}h", IdleRewardMgr.QUICK_IDLE_MINUTES / 60);
     RefreshState();
     InvokeRepeating("UpdateClock", 0, 1f);
 }
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);
            int dataIndex    = int.Parse(arg as string);
            var pointDataMgr = CampsiteMgr.singleton.GetPointByIndex(dataIndex);

            desc.text.text = LanguageMgr.GetText("CampTab_Battle_Text", pointDataMgr.buildingRes.buildingName);
        }
        private void RefreshData(int dataIndex)
        {
            if (pointDataMgr != null && dataIndex != pointDataMgr.index)
            {
                return;
            }
            LvTxt.text.text       = string.Format("Lv.{0}", pointDataMgr.Lv);
            RewardTxt.text.text   = UiTools.FormateMoney(pointDataMgr.OnceRewardVal);
            IntervalTxt.text.text = LanguageMgr.GetText("CampDetail_Text_Time", pointDataMgr.RewardInterval);
            AutoTipTxt.text.text  = LanguageMgr.GetText("CampDetail_Tips_Auto", pointDataMgr.AutoLv);
            if (pointDataMgr.isAuto)
            {
                UIGray.Recovery(AutoIcon.image);
                AutoTxt.text.text     = LanguageMgr.GetText("CampDetail_Rule_AutoOpen");
                AutoTxt.text.color    = Color.green;
                AutoTipTxt.text.color = Color.green;
                DescTxt.text.text     = LanguageMgr.GetText("CampDetail_Text_Upgrade");
            }
            else
            {
                UIGray.SetUIGray(AutoIcon.image);
                AutoTxt.text.text     = LanguageMgr.GetText("CampDetail_Rule_AutoClose");
                AutoTxt.text.color    = Color.red;
                AutoTipTxt.text.color = Color.red;
                if (pointDataMgr.equipGunId > 0)
                {
                    DescTxt.text.text = LanguageMgr.GetText("CampDetail_Text_NOAuto");
                }
                else
                {
                    DescTxt.text.text = LanguageMgr.GetText("CampDetail_Text_NoWeapon");
                }
            }

            var lvUpCost = pointDataMgr.GetLvUpCost(1);

            CostTxt.text.text = UiTools.FormateMoney(lvUpCost);
            if (lvUpCost <= CampsiteMgr.singleton.TotalRewardVal)
            {
                CostTxt.text.color = Color.white;
            }
            else
            {
                CostTxt.text.color = Color.red;
            }

            if (pointDataMgr.equipGunId > 0)
            {
                CardData.gameObject.SetActive(true);
                CardData.GunUI_GunCard.Init(TableMgr.singleton.GunCardTable.GetItemByID(pointDataMgr.equipGunId));
                SetGunTxt.text.text = LanguageMgr.GetText("CampDetail_Button_Change");
            }
            else
            {
                CardData.gameObject.SetActive(false);
                SetGunTxt.text.text = LanguageMgr.GetText("CampDetail_Button_Equi");
            }
        }
Esempio n. 9
0
        public void Init(GunCard_TableItem res)
        {
            TipsTitle.text.text = LanguageMgr.GetText(res.tid_name);
            IconBtn.image.sprite = Resources.Load(res.icon, typeof(Sprite)) as Sprite;
            Frame.image.sprite = Resources.Load(TableMgr.singleton.ValueTable.GetCardQualityFrame(res.rarity),
                                                typeof(Sprite)) as Sprite;

            //根据品质设置亮边
        }
Esempio n. 10
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);
            var pointDataMgr = arg as CampsitePointMgr;

            Title.text.text = pointDataMgr.buildingRes.buildingName;
            RewardBase.CampDetailItem.SetValue(UiTools.FormateMoney(pointDataMgr.RewardBase));
            RewardPlayer.CampDetailItem.SetTitle(LanguageMgr.GetText("CampDetail_Rule_Rank", PlayerDataMgr.singleton.GetPlayerLevel()));
            RewardPlayer.CampDetailItem.SetValue(string.Format("x{0}", pointDataMgr.RewardFactorByPlayer));
            RewardSettleTxt.text.text = UiTools.FormateMoney(pointDataMgr.OnceRewardVal);
            IntervalBase.CampDetailItem.SetValue(LanguageMgr.GetText("CampDetail_Text_Time", pointDataMgr.RewardIntervalBase));
            IntervalSettleTxt.text.text = LanguageMgr.GetText("CampDetail_Text_Time", pointDataMgr.RewardInterval);
            CostBase.CampDetailItem.SetValue(UiTools.FormateMoney(pointDataMgr.LvUpCostBase));
            CostSettleTxt.text.text = UiTools.FormateMoney(pointDataMgr.GetLvUpCost(1));
            string autoColorHex = ColorUtility.ToHtmlStringRGB(pointDataMgr.isAuto ? Color.green : Color.red);

            AutoSettleTxt.text.color = pointDataMgr.isAuto ? Color.green : Color.red;
            AutoSettleTxt.text.text  = LanguageMgr.GetText(pointDataMgr.isAuto ? "CampDetail_Rule_AutoOpen" : "CampDetail_Rule_AutoClose");

            if (pointDataMgr.equipGunId > 0)
            {
                var gunRes     = TableMgr.singleton.GunCardTable.GetItemByID(pointDataMgr.equipGunId);
                var cardSprite = Global.gApp.gResMgr.LoadAssets <Sprite>(gunRes.icon);
                RewardCardBase.CampDetailItem.SetIcon(cardSprite);
                RewardCardBase.CampDetailItem.SetValue(string.Format("x{0}", pointDataMgr.RewardFactorByCardBase));
                var rewardFactorByCardSkill = pointDataMgr.RewardFactorByCardSkill;
                if (rewardFactorByCardSkill > 1)
                {
                    RewardCardSkill.CampDetailItem.SetIcon(cardSprite);
                    RewardCardSkill.CampDetailItem.SetValue(string.Format("x{0}", rewardFactorByCardSkill));
                }
                else
                {
                    RewardCardSkill.gameObject.SetActive(false);
                }

                var intervalFactorByCardSkill = pointDataMgr.RewardIntervalFactorByCardSkill;
                if (intervalFactorByCardSkill > 1)
                {
                    IntervalCardSkill.CampDetailItem.SetIcon(cardSprite);
                    IntervalCardSkill.CampDetailItem.SetValue(string.Format("x{0}", intervalFactorByCardSkill));
                }
                else
                {
                    IntervalCardSkill.gameObject.SetActive(false);
                }
                var gunLv = PlayerDataMgr.singleton.GetCardLevel(pointDataMgr.equipGunId);
                AutoCardLv.CampDetailItem.SetValue(string.Format("<color=#{0}>{1}</color>/{2}", autoColorHex, gunLv, pointDataMgr.AutoLv));
            }
            else
            {
                RewardCardBase.gameObject.SetActive(false);
                RewardCardSkill.gameObject.SetActive(false);
                IntervalCardSkill.gameObject.SetActive(false);
                AutoCardLv.CampDetailItem.SetValue(string.Format("<color=#{0}>{1}</color>/{2}", autoColorHex, 0, pointDataMgr.AutoLv));
            }
        }
Esempio n. 11
0
 internal override void OnDateTimeRefresh(DateTimeRefreshType type)
 {
     base.OnDateTimeRefresh(type);
     if (type == DateTimeRefreshType.OneDay)
     {
         isClick = false;
         Global.gApp.gMsgDispatcher.Broadcast(MsgIds.ShowGameTipsByStr, LanguageMgr.GetText("Active_Award_Data"));
         TouchClose();
     }
 }
Esempio n. 12
0
 private void UpdateClock()
 {
     if (DateTimeMgr.singleton.HasFixedServer)
     {
         var clock = DateTimeMgr.singleton.RefreshTime_OneDay - DateTimeMgr.singleton.Now;
         clockTxt.text = LanguageMgr.GetText("QuickPage_Text_Reset", (int)clock.TotalHours, clock.Minutes, clock.Seconds);
     }
     else
     {
         clockTxt.text = "";
     }
 }
 private void HandleClaimCallback(CampsiteRequestResult result)
 {
     isClick = false;
     if (result == CampsiteRequestResult.Success)
     {
         CampsiteMgr.singleton.ClaimAllReward();
         TouchClose();
     }
     else if (result == CampsiteRequestResult.NetFail)
     {
         Global.gApp.gMsgDispatcher.Broadcast(MsgIds.ShowGameTipsByStr, LanguageMgr.GetText("Active_Award_No_Network"));
     }
 }
Esempio n. 14
0
        public void Init(int id)
        {
            gunCardRes = TableMgr.singleton.GunCardTable.GetItemByID(id);
            if (gunCardRes == null)
            {
                return;
            }

            TipsTitle.text.text  = LanguageMgr.GetText(gunCardRes.tid_name);
            IconBtn.image.sprite = Resources.Load(gunCardRes.icon, typeof(Sprite)) as Sprite;
            Frame.image.sprite   = Resources.Load(TableMgr.singleton.ValueTable.GetCardQualityFrame(gunCardRes.rarity),
                                                  typeof(Sprite)) as Sprite;
        }
Esempio n. 15
0
        private void CheckPointDataChange()
        {
            var curRewardVal = pointDataMgr.OnceRewardVal;
            var curInterval  = pointDataMgr.RewardInterval;
            var curIsAuto    = pointDataMgr.isAuto;
            var curLvUpCost  = pointDataMgr.GetLvUpCost(1);

            bool hasChange = false;

            if (curRewardVal != lastRewardVal)
            {
                RewardChangeItem.CampsitePointUI_DataChangeItem.Init
                    (UiTools.FormateMoney(lastRewardVal), UiTools.FormateMoney(curRewardVal), curRewardVal > lastRewardVal);
                RewardChangeItem.gameObject.SetActive(true);
                hasChange = true;
            }
            else
            {
                RewardChangeItem.gameObject.SetActive(false);
            }
            if (curInterval != lastInterval)
            {
                IntervalChangeItem.CampsitePointUI_DataChangeItem.Init
                    (LanguageMgr.GetText("CampDetail_Text_Time", lastInterval), LanguageMgr.GetText("CampDetail_Text_Time", curInterval), curInterval < lastInterval);
                IntervalChangeItem.gameObject.SetActive(true);
                hasChange = true;
            }
            else
            {
                IntervalChangeItem.gameObject.SetActive(false);
            }
            if (curIsAuto != lastIsAuto)
            {
                AutoChangeItem.CampsitePointUI_DataChangeItem.Init
                    (LanguageMgr.GetText(lastIsAuto ? "CampDetail_Rule_AutoOpen" : "CampDetail_Rule_AutoClose"),
                    LanguageMgr.GetText(curIsAuto ? "CampDetail_Rule_AutoOpen" : "CampDetail_Rule_AutoClose"),
                    curIsAuto);
                AutoChangeItem.gameObject.SetActive(true);
                hasChange = true;
            }
            else
            {
                AutoChangeItem.gameObject.SetActive(false);
            }

            if (hasChange)
            {
                StopAllCoroutines();
                StartCoroutine(ShowChangeDataPanelIE());
            }
        }
Esempio n. 16
0
        private void ShowStars()
        {
            if (levelRes == null)
            {
                return;
            }

            var stageData = PlayerDataMgr.singleton.GetStageData(levelRes.id);

            if (stageData == null)
            {
                return;
            }

            LevelTitle.text.text = LanguageMgr.GetText("Explore_RewardPage_Title", levelRes.id);
            BigInteger gold = levelRes.gold;

            GoldCount.text.text = string.Format("x{0}", gold.ToSymbolString());

            if (levelRes.reward > 0)
            {
                LevelReward.gameObject.SetActive(true);
                LevelRewardIcon.image.sprite = GameGoodsMgr.singleton.GetGameGoodsIcon((GoodsType)levelRes.reward);
                LevelRewardCount.text.text   = string.Format("x{0}", levelRes.reward_count);
            }
            else
            {
                LevelReward.gameObject.SetActive(false);
            }

            for (int i = 0; i < levelRes.starList.Length; ++i)
            {
                var res = TableMgr.singleton.LevelStarRateTable.GetItemByID(levelRes.starList[i]);
                if (res == null)
                {
                    return;
                }

                starTextList[i].text = LanguageMgr.GetText(res.tid_name, levelRes.cardLevel);

                if (stageData.starList.Contains(res.id))
                {
                    curStarList[i].SetActive(true);
                }
                else
                {
                    curStarList[i].SetActive(false);
                }
            }
        }
Esempio n. 17
0
        private void InitFuseSkill(int id)
        {
            var fuseSkillRes = TableMgr.singleton.FuseGunSkillTable.GetItemByID(skillInfo.skillID);

            if (fuseSkillRes == null)
            {
                return;
            }

            SkillName.text.text    = LanguageMgr.GetText(fuseSkillRes.tid_name);
            SkillIcon.image.sprite = Resources.Load(fuseSkillRes.icon, typeof(Sprite)) as Sprite;

            CurDesc.text.text = LanguageMgr.GetText(fuseSkillRes.tid_desc, fuseSkillRes.value);
        }
Esempio n. 18
0
        public void InitCampSkill(int id)
        {
            skillInfo.type    = SkillType.Camp;
            skillInfo.skillID = id;

            var campSkillRes = TableMgr.singleton.CampGunSkillTable.GetItemByID(id);

            if (campSkillRes == null)
            {
                return;
            }

            SkillName.text.text  = LanguageMgr.GetText(campSkillRes.tid_name);
            IconBtn.image.sprite = Resources.Load(campSkillRes.icon, typeof(Sprite)) as Sprite;
        }
Esempio n. 19
0
 public void SetDescState(GameObject descRoot, Text descTxt)
 {
     if (descRoot.activeSelf && descRoot.transform.parent == DescNode.rectTransform)
     {
         descRoot.SetActive(false);
     }
     else
     {
         descRoot.SetActive(true);
         descRoot.transform.SetParent(DescNode.rectTransform, false);
         descRoot.transform.localPosition = Vector3.zero;
         var buildingRes = TableMgr.singleton.CampBuildingTable.GetItemByID(skillRes.campBuilding);
         descTxt.text = LanguageMgr.GetText(skillRes.tid_desc, buildingRes.buildingName, skillRes.value);
     }
 }
Esempio n. 20
0
        private void SetData(int dataIndex)
        {
            pointDataMgr      = CampsiteMgr.singleton.GetPointByIndex(dataIndex);
            NameTxt.text.text = pointDataMgr.buildingRes.buildingName;
            var gunTypeRes = TableMgr.singleton.GunTypeTable.GetItemByID(pointDataMgr.buildingRes.gunType);

            //TypeImg.image.sprite = gunTypeRes.icon
            TypeTxt.text.text = LanguageMgr.GetText(gunTypeRes.tid_type);
            HomeUI homePanel = Global.gApp.gUiMgr.GetPanelCompent <HomeUI>(Wndid.HomeUI);

            if (homePanel != null)
            {
                homePanel.OnFocusPoint(dataIndex);
            }
            RefreshData(dataIndex);
        }
Esempio n. 21
0
        private void RefreshData(bool refreshUI)
        {
            if (campPointMgr == null)
            {
                return;
            }

            double rewardFactor;
            float  intervalFactor;

            campPointMgr.GetCardTotalFactorOnPoint(cardId, out rewardFactor, out intervalFactor);

            bool auto = campPointMgr.CheckCardIsAuto(cardId);

            if (refreshUI)
            {
                RewardFactorBefore.text.text = string.Format("x{0}", UiTools.FormateMoney(recordRewardFactor));
                RewardFactorCur.text.text    = string.Format("x{0}", UiTools.FormateMoney(rewardFactor));

                if (auto != recordAuto)
                {
                    AutoDataChange.gameObject.SetActive(true);
                    AutoData.gameObject.SetActive(false);
                    AutoValBefore.text.text = LanguageMgr.GetText(recordAuto ? "CardPage_Tips_Open" : "CardPage_Tips_Close");
                    AutoValCur.text.text    = LanguageMgr.GetText(auto ? "CardPage_Tips_Open" : "CardPage_Tips_Close");
                }
                else
                {
                    AutoDataChange.gameObject.SetActive(false);
                    AutoData.gameObject.SetActive(true);
                    if (auto)
                    {
                        AutoVal.text.text = LanguageMgr.GetText("CardPage_Tips_Open");
                        AutoLvTip.gameObject.SetActive(false);
                    }
                    else
                    {
                        AutoVal.text.text   = LanguageMgr.GetText("CardPage_Tips_Close");
                        AutoLvTip.text.text = LanguageMgr.GetText("CardPage_Tips_Tips", campPointMgr.AutoLv);
                        AutoLvTip.gameObject.SetActive(true);
                    }
                }
            }

            recordRewardFactor = rewardFactor;
            recordAuto         = auto;
        }
Esempio n. 22
0
        void RefreshInfo()
        {
            rewardGoldTxt.text = IdleRewardMgr.singleton.GetRewardGold().ToSymbolString();
            //rewardSpeedTxt.text = LanguageMgr.GetText("Idle_UI_IdleBenefit", IdleRewardMgr.singleton.GetGoldPerMinute().ToSymbolString(1));
            var maxIdleHour = IdleRewardMgr.singleton.GetMaxIdleHour();

            idleMaxHourTxt.text = LanguageMgr.GetText("IdelPage_Text_MaxTime", maxIdleHour);
            var idleTimeSpan = IdleRewardMgr.singleton.GetIdleTimeSpan();

            idleTimeTxt.text = string.Format("{0:00}:{1:00}:{2:00}",
                                             Mathf.FloorToInt((float)idleTimeSpan.TotalHours), idleTimeSpan.Minutes, idleTimeSpan.Seconds);
            var idleHour = idleTimeSpan.TotalHours;

            idleProcess.value        = (float)idleHour / maxIdleHour;
            maxDurationDocTxt.text   = LanguageMgr.GetText("IdelPage_Text_Tips", IdleRewardMgr.EACH_HERO_ADD_HOUR);
            collectCardCountTxt.text = LanguageMgr.GetText("IdelPage_Text_Number", PlayerDataMgr.singleton.GetCollectCardCount());
        }
Esempio n. 23
0
        private void ShowRewardInfo()
        {
            ClearShowList();

            StarCount.text.text = LanguageMgr.GetText("Explore_StarsPage_Own", PlayerDataMgr.singleton.GetChapterStar());

            foreach (LevelStarReward_TableItem starRes in TableMgr.singleton.LevelStarRewardTable.getEnumerator())
            {
                var rewardItem = StarReward.GetInstance();

                rewardItem.Init(starRes);
                rewardItem.transform.SetParent(StarRewardRoot.gameObject.transform);
                rewardItem.gameObject.SetActive(true);
                rewardItem.transform.SetAsLastSibling();
                rewardItemList.Add(rewardItem);
            }
        }
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);
            ClaimBtn.button.onClick.AddListener(OnClaimBtnClick);
            double dt; double reward;

            if (CampsiteMgr.singleton.CheckOfflineReward(out dt, out reward))
            {
                RewardValTxt.text.text = UiTools.FormateMoney(reward);
                TimeSpan ts = new TimeSpan((long)(10000000 * dt));
                OfflineTimeTxt.text.text      = string.Format("{0:00}:{1:00}:{2:00}", (int)ts.TotalHours, ts.Minutes, ts.Seconds);
                OfflineTimeBar.slider.value   = Mathf.Clamp01((float)(dt / (CampsiteMgr.singleton.GetMaxOfflineHour() * 60 * 60)));
                MinHourTxt.text.text          = "0";
                MaxHourTxt.text.text          = LanguageMgr.GetText("IdelPage_Text_MaxTime", CampsiteMgr.singleton.GetMaxOfflineHour());
                MaxDurationDocTxt.text.text   = LanguageMgr.GetText("IdelPage_Text_Tips", CampsiteMgr.OFFLINE_HOUR_EACH_CARD);
                CollectCardCountTxt.text.text = LanguageMgr.GetText("IdelPage_Text_Number", PlayerDataMgr.singleton.GetCollectCardCount());
            }
        }
        private void RefreshData(CampsitePointMgr targetPoint, int cardId)
        {
            var gunRes = TableMgr.singleton.GunCardTable.GetItemByID(cardId);

            CardData.gameObject.SetActive(true);
            CardData.GunUI_GunCard.Init(gunRes);

            int skillId = PlayerDataMgr.singleton.GetCampSkillID(cardId);

            CampSkill.CampSkill.Init(skillId);
            CampSkill.CampSkill.SetValid(targetPoint.CheckIsValidSkill(skillId));
            AutoTipTxt.text.text = LanguageMgr.GetText("CampDetail_Tips_Auto", targetPoint.AutoLv);
            if (targetPoint.CheckCardIsAuto(cardId))
            {
                UIGray.Recovery(AutoIcon.image);
                AutoTxt.text.text     = LanguageMgr.GetText("CampDetail_Rule_AutoOpen");
                AutoTxt.text.color    = Color.green;
                AutoTipTxt.text.color = Color.green;
            }
            else
            {
                UIGray.SetUIGray(AutoIcon.image);
                AutoTxt.text.text     = LanguageMgr.GetText("CampDetail_Rule_AutoClose");
                AutoTxt.text.color    = Color.red;
                AutoTipTxt.text.color = Color.red;
            }

            double rewardFactor;
            float  intervalFactor;

            targetPoint.GetCardTotalFactorOnPoint(cardId, out rewardFactor, out intervalFactor);
            RewardFactorTxt.text.text = string.Format("x{0}", UiTools.FormateMoney(rewardFactor));
            if (Mathf.Approximately(intervalFactor, 1f))
            {
                IntervalFactorNode.gameObject.SetActive(false);
            }
            else
            {
                IntervalFactorTxt.text.text = string.Format("-{0:#0.##%}", intervalFactor);
            }
        }
        public void Init(int id, int count)
        {
            cardID    = id;
            cardCount = count;

            TypeIcon.gameObject.SetActive(false);

            var gunCardRes = TableMgr.singleton.GunCardTable.GetItemByID(cardID);

            if (gunCardRes == null)
            {
                return;
            }

            TipsTitle.text.text  = LanguageMgr.GetText(gunCardRes.tid_name);
            IconBtn.image.sprite = Resources.Load(gunCardRes.icon, typeof(Sprite)) as Sprite;
            Frame.image.sprite   = Resources.Load(TableMgr.singleton.ValueTable.GetCardQualityFrame(gunCardRes.rarity),
                                                  typeof(Sprite)) as Sprite;

            SetCount(0);
        }
Esempio n. 27
0
        private void InitCampSkill(int id)
        {
            var campSkillRes = TableMgr.singleton.CampGunSkillTable.GetItemByID(skillInfo.skillID);

            if (campSkillRes == null)
            {
                return;
            }

            SkillName.text.text    = LanguageMgr.GetText(campSkillRes.tid_name);
            SkillIcon.image.sprite = Resources.Load(campSkillRes.icon, typeof(Sprite)) as Sprite;

            var buildingRes = TableMgr.singleton.CampBuildingTable.GetItemByID(campSkillRes.campBuilding);

            if (buildingRes == null)
            {
                return;
            }

            CurDesc.text.text = LanguageMgr.GetText(campSkillRes.tid_desc, buildingRes.buildingName, campSkillRes.value);
        }
Esempio n. 28
0
 private void AddNetOpenBuffer(string panelName, UIInfo uiInfo, object args)
 {
     if (InternetMgr.singleton.IsInternetConnect())
     {
         NetOpenBuffer buffer = new NetOpenBuffer()
         {
             panelName = panelName,
             info      = uiInfo,
             args      = args
         };
         m_NetOpenBufferQueue.Enqueue(buffer);
         if (uiInfo.NetOpenShowLoading && !CheckPanelExit(Wndid.LoadingUI))
         {
             OpenPanel(Wndid.LoadingUI);
         }
         DateTimeMgr.singleton.FixedLocalTime();
     }
     else
     {
         Global.gApp.gMsgDispatcher.Broadcast(MsgIds.ShowGameTipsByStr, LanguageMgr.GetText("Active_Award_No_Network"));
     }
 }
Esempio n. 29
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);
            string idStr = arg as string;

            if (!UiTools.IsNumeric(idStr))
            {
                Debug.LogErrorFormat("对话id非法 = {0}", idStr);
                TouchClose();
                return;
            }
            campID = int.Parse(idStr);

            var campRes = TableMgr.singleton.CampSetTable.GetItemByID(campID);

            if (campRes == null)
            {
                return;
            }

            TitleText.text.text = LanguageMgr.GetText("CampChapter", campID);
            NameText.text.text  = LanguageMgr.GetText(campRes.tid_name);
        }
Esempio n. 30
0
        private void InitCampSkill(int id)
        {
            var campSkillRes = TableMgr.singleton.CampGunSkillTable.GetItemByID(skillInfo.skillID);

            if (campSkillRes == null)
            {
                return;
            }

            SkillName.text.text    = LanguageMgr.GetText(campSkillRes.tid_name);
            SkillIcon.image.sprite = Resources.Load(campSkillRes.icon, typeof(Sprite)) as Sprite;

            NextLv.text.text   = string.Format("Lv.{0}", campSkillRes.level);
            NextDesc.text.text = string.Format("{0}", campSkillRes.value);

            campSkillRes = TableMgr.singleton.CampGunSkillTable.GetItemByID(skillInfo.skillID - 1);
            if (campSkillRes == null)
            {
                return;
            }

            CurLv.text.text   = string.Format("Lv.{0}", campSkillRes.level);
            CurDesc.text.text = string.Format("{0}", campSkillRes.value);
        }