Пример #1
0
 private void DiamondChanged(double val)
 {
     if (!m_idEndLock[GoodsType.DIAMOND])
     {
         return;
     }
     AssetChangeImp(DiamondTxt.text, UiTools.FormateMoney(val));
 }
Пример #2
0
 private void CampRewardChanged(double val)
 {
     if (!m_idEndLock[GoodsType.CAMPSITE_REWARD])
     {
         return;
     }
     AssetChangeImp(CampRewardTxt.text, UiTools.FormateMoney(val));
 }
Пример #3
0
        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");
            }
        }
Пример #4
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));
            }
        }
Пример #5
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);

            m_ItemDTO = arg as ItemDTO;
            ConsumeValue.text.text   = "×" + UiTools.FormateMoneyUP(m_ItemDTO.num);
            ConsumeIcon.image.sprite = Global.gApp.gResMgr.LoadAssets <Sprite>(string.Format(CommonResourceConstVal.RESOURCE_PATH, m_ItemDTO.itemId));
            box_open.gameObject.SetActive(false);
            box_close.gameObject.SetActive(true);
            ItemItem itemCfg = Global.gApp.gGameData.ItemData.Get(m_ItemDTO.itemId);

            if (itemCfg != null)
            {
                if (itemCfg.openBoxImg != null && itemCfg.openBoxImg != string.Empty)
                {
                    box_open.image.sprite = Global.gApp.gResMgr.LoadAssets <Sprite>(itemCfg.openBoxImg);
                }
                if (itemCfg.closeBoxImg != null && itemCfg.closeBoxImg != string.Empty)
                {
                    box_close.image.sprite = Global.gApp.gResMgr.LoadAssets <Sprite>(itemCfg.closeBoxImg);
                }
            }

            m_UI_openbox_white.gameObject.SetActive(m_ItemDTO.itemId == SpecialItemIdConstVal.ENERGY);
            m_UI_openbox_purple.gameObject.SetActive(m_ItemDTO.itemId == SpecialItemIdConstVal.MDT);
            m_UI_openbox.gameObject.SetActive(m_ItemDTO.itemId != SpecialItemIdConstVal.ENERGY && m_ItemDTO.itemId != SpecialItemIdConstVal.MDT);

            bool haveThree = itemCfg.id == SpecialItemIdConstVal.GOLD;

            Btn1.gameObject.SetActive(haveThree);
            Btn2.gameObject.SetActive(haveThree);
            if (haveThree)
            {
                Btn1.button.onClick.AddListener(OnClick1);
                Btn2.button.onClick.AddListener(OnClick3);
                CmNum.text.text   = UiTools.FormateMoney(m_ItemDTO.num);
                CmNumAd.text.text = UiTools.FormateMoney(m_ItemDTO.num * m_ADTimes);
            }
            else
            {
                gameObject.AddComponent <DelayCallBack>().SetAction(() =>
                {
                    if (m_ItemDTO.param3 > 0)
                    {
                        Global.gApp.gSystemMgr.GetQuestMgr().ReceiveQuest((int)m_ItemDTO.param3, 1, BehaviorTypeConstVal.OPT_LEVEL_DETAIL);
                    }

                    OnOpen();
                }, 0.8f, true);
            }


            RegisterListeners();
            base.ChangeLanguage();
        }
Пример #6
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());
            }
        }
        private void Deal4Level(ItemItem itemConfig)
        {
            m_ItemConfig = itemConfig;
            int gunLevel     = Global.gApp.gSystemMgr.GetWeaponMgr().GetWeaponLevel(itemConfig.name);
            int gunShowLevel = Global.gApp.gSystemMgr.GetWeaponMgr().GetWeaponShowLevel(itemConfig.name);

            WeaponLvTxt.text.text = "lv: " + gunShowLevel;
            Guns_dataItem weaponLevelData = Global.gApp.gGameData.GunDataConfig.Get(gunLevel);

            double[] paramValue;
            if (Global.gApp.gSystemMgr.GetWeaponMgr().GetQualityLv(m_ItemConfig) == 0)
            {
                paramValue = ReflectionUtil.GetValueByProperty <Guns_dataItem, double[]>(itemConfig.name, weaponLevelData);
                double showVal = itemConfig.showParam / itemConfig.dtime * paramValue[0];
                Param1Txt.text.text = UiTools.FormateMoney(showVal);
            }
            else
            {
                paramValue = ReflectionUtil.GetValueByProperty <Guns_dataItem, double[]>(itemConfig.name + "_super", weaponLevelData);
                double showVal = itemConfig.showParam / itemConfig.dtime * paramValue[0];
                Param1Txt.text.text = UiTools.FormateMoney(showVal);
            }
            m_WeaponName = itemConfig.name;
            int m_QualityLevel            = itemConfig.qualevel;
            GeneralConfigItem colorConfig = Global.gApp.gGameData.GeneralConfigData.Get(GeneralConfigConstVal.QUALITY_COLOR);

            WeaponNameTxt.text.color = ColorUtil.GetColor(colorConfig.contents[m_QualityLevel]);
            WeaponBg.image.sprite    = Resources.Load(string.Format(CommonResourceConstVal.WEAPON_BG_PATH, m_QualityLevel), typeof(Sprite)) as Sprite;

            if (m_QualityLevel > 0)
            {
                EffectItem effectItem = Global.gApp.gGameData.EffectData.Get(EffectConstVal.QUALITY);
                GameObject effect     = UiTools.GetEffect(string.Format(effectItem.path, m_QualityLevel), transform);
                if (mEffect != null)
                {
                    GameObject.Destroy(mEffect);
                }
                mEffect = effect;
                mEffect.transform.SetParent(WeaponIcon.rectTransform, true);
                if (m_IconParentNode == null)
                {
                    m_IconParentNode = WeaponIcon.gameObject.transform.parent;
                    WeaponIcon.gameObject.GetComponent <WeaponUI_Item_Follow>().SetFollowNode(m_IconParentNode);
                    WeaponIcon.gameObject.transform.SetParent(m_Parent.GetViewPoint2().transform, true);
                }
            }
        }
Пример #8
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;
        }
Пример #9
0
 private void SetConsumeCoin()
 {
     m_ComsumeItem = Global.gApp.gSystemMgr.GetSkillMgr().GetSkillUpdateItem();
     CmIcon.gameObject.SetActive(m_ComsumeItem != null);
     CmNum.gameObject.SetActive(m_ComsumeItem != null);
     Maxtxt.gameObject.SetActive(m_ComsumeItem == null);
     dotxt.gameObject.SetActive(m_ComsumeItem != null);
     if (m_ComsumeItem != null)
     {
         int itemId = m_ComsumeItem.itemId;
         CmIcon.gameObject.SetActive(true);
         CmIcon.image.sprite = Global.gApp.gResMgr.LoadAssets <Sprite>(string.Format(CommonResourceConstVal.RESOURCE_PATH, itemId));
         CmNum.text.text     = UiTools.FormateMoney(m_ComsumeItem.num);
         CmNum.text.color    = ColorUtil.GetTextColor(GameItemFactory.GetInstance().GetItem((int)m_ComsumeItem.itemId) < m_ComsumeItem.num,
                                                      Global.gApp.gGameData.GeneralConfigData.Get(GeneralConfigConstVal.YELLOW_COLOR).content);
     }
 }
        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());
            }
        }
Пример #11
0
        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);
            }
        }
        private void InitNode()
        {
            m_CloseBtn.button.onClick.AddListener(TouchClose);

            m_CurWpnIcon.image.sprite  = Resources.Load(m_ItemItem.image_grow, typeof(Sprite)) as Sprite;
            m_NextWpnIcon.image.sprite = Resources.Load(m_ItemItem.image_grow + "_s", typeof(Sprite)) as Sprite;



            int           gunLevel        = Global.gApp.gSystemMgr.GetWeaponMgr().GetWeaponLevel(m_ItemItem.name);
            int           gunShowLevel    = Global.gApp.gSystemMgr.GetWeaponMgr().GetWeaponShowLevel(m_ItemItem.name);
            Guns_dataItem weaponLevelData = Global.gApp.gGameData.GunDataConfig.Get(gunLevel);


            double[] paramValuePpre  = ReflectionUtil.GetValueByProperty <Guns_dataItem, double[]>(m_ItemItem.name, weaponLevelData);
            double[] paramValueSuper = ReflectionUtil.GetValueByProperty <Guns_dataItem, double[]>(m_ItemItem.name + "_super", weaponLevelData);
            double   showVal1        = m_ItemItem.showParam / m_ItemItem.dtime * paramValuePpre[0];
            double   nextVal         = m_ItemItem.showParam / m_ItemItem.dtime * paramValueSuper[0];

            CurVal.text.text      = UiTools.FormateMoney(showVal1);
            IncreaseVal.text.text = "+" + UiTools.FormateMoney(nextVal - showVal1);
        }
Пример #13
0
 private void RefreshCampRate()
 {
     CampRateTxt.text.text = string.Format("{0}/s", UiTools.FormateMoney(CampsiteMgr.singleton.TotalRewardRate));
 }
Пример #14
0
        private void FreshItem(CampBuffItem cbi, SkillItemDTO dto, bool lockBuff, CampBUFF_ItemSmall item, CampBUFF_ItemDetail itemDetail)
        {
            item.name.text.text          = Global.gApp.gGameData.GetTipsInCurLanguage(cbi.name);
            itemDetail.name.text.text    = Global.gApp.gGameData.GetTipsInCurLanguage(cbi.name);
            item.goods.image.sprite      = Global.gApp.gResMgr.LoadAssets <Sprite>(cbi.icon);
            itemDetail.icon.image.sprite = Global.gApp.gResMgr.LoadAssets <Sprite>(cbi.icon);
            item.level.text.text         = dto.level.ToString();
            itemDetail.level.text.text   = dto.level.ToString();
            CampBuff_dataItem curData;
            CampBuff_dataItem nextData;
            string            curPercent;

            float[] cost;

            float heartCost;

            if (dto.level < Global.gApp.gGameData.CampBuffDataConfig.items.Length)
            {
                itemDetail.Button.gameObject.SetActive(dto.state != WeaponStateConstVal.NONE);
                itemDetail.unlockTips.gameObject.SetActive(dto.state == WeaponStateConstVal.NONE);
                if (dto.state == WeaponStateConstVal.NONE)
                {
                    itemDetail.unlockTips.text.text = string.Format(Global.gApp.gGameData.GetTipsInCurLanguage(4378), cbi.campLevel);
                }
                //升级
                if (dto.level > 0)
                {
                    curData  = Global.gApp.gGameData.CampBuffDataConfig.items[dto.level - 1];
                    nextData = Global.gApp.gGameData.CampBuffDataConfig.items[dto.level];
                    float[] curVal  = ReflectionUtil.GetValueByProperty <CampBuff_dataItem, float[]>(cbi.id, curData);
                    float[] nextVal = ReflectionUtil.GetValueByProperty <CampBuff_dataItem, float[]>(cbi.id, nextData);
                    curPercent = GetPercentStr(cbi, curVal[0]);
                    string nextPercent = GetPercentStr(cbi, nextVal[0]);
                    itemDetail.desc.text.text = string.Format(Global.gApp.gGameData.GetTipsInCurLanguage(cbi.desc), curPercent, nextPercent);
                    item.text.text.text       = "+" + curPercent;

                    cost      = ReflectionUtil.GetValueByProperty <CampBuff_dataItem, float[]>(cbi.id + "_cost", curData);
                    heartCost = cost[0];
                    itemDetail.upgrade.gameObject.SetActive(true);
                    itemDetail.unlock.gameObject.SetActive(false);
                    itemDetail.cost.text.text = UiTools.FormateMoney(heartCost);
                }
                else
                {
                    //解锁
                    nextData = Global.gApp.gGameData.CampBuffDataConfig.items[dto.level];
                    float[] nextVal     = ReflectionUtil.GetValueByProperty <CampBuff_dataItem, float[]>(cbi.id, nextData);
                    string  nextPercent = GetPercentStr(cbi, nextVal[0]);
                    itemDetail.desc.text.text = string.Format(Global.gApp.gGameData.GetTipsInCurLanguage(cbi.desc_nolearn), nextPercent);
                    itemDetail.upgrade.gameObject.SetActive(false);
                    itemDetail.unlock.gameObject.SetActive(true);
                    heartCost = cbi.unlockCost;
                    itemDetail.cost.text.text = UiTools.FormateMoney(heartCost);
                }
                bool red = GameItemFactory.GetInstance().GetItem(SpecialItemIdConstVal.RED_HEART) < heartCost;
                itemDetail.cost.text.color = ColorUtil.GetTextColor(red, ColorUtil.m_YellowColor);
                itemDetail.up.gameObject.SetActive(!lockBuff && !red);
            }
            else
            {
                //满级
                curData  = Global.gApp.gGameData.CampBuffDataConfig.items[dto.level - 2];
                nextData = Global.gApp.gGameData.CampBuffDataConfig.items[dto.level - 1];
                float[] curVal  = ReflectionUtil.GetValueByProperty <CampBuff_dataItem, float[]>(cbi.id, curData);
                float[] nextVal = ReflectionUtil.GetValueByProperty <CampBuff_dataItem, float[]>(cbi.id, nextData);
                curPercent = GetPercentStr(cbi, nextVal[0]);
                itemDetail.desc.text.text = string.Format(Global.gApp.gGameData.GetTipsInCurLanguage(cbi.max_desc), curPercent);

                itemDetail.Button.gameObject.SetActive(false);
                itemDetail.unlockTips.gameObject.SetActive(true);
                itemDetail.unlockTips.text.text = Global.gApp.gGameData.GetTipsInCurLanguage(4383);
                itemDetail.up.gameObject.SetActive(false);
                item.text.text.text = "+" + curPercent;
            }
            item.lockIcon.gameObject.SetActive(lockBuff);
            itemDetail.lockIcon.gameObject.SetActive(lockBuff);
            item.numberBg.gameObject.SetActive(!lockBuff);
            item.text.gameObject.SetActive(!lockBuff);
            item.goods.image.color      = ColorUtil.GetSpecialColor(lockBuff, ColorUtil.m_HalfColor);
            itemDetail.icon.image.color = ColorUtil.GetSpecialColor(lockBuff, ColorUtil.m_HalfColor);
            itemDetail.lvBg.gameObject.SetActive(!lockBuff);
            item.lvBg.gameObject.SetActive(!lockBuff);
        }
Пример #15
0
        private void InitPlayerInfo()
        {
            RateValue.text.text = string.Format("{0}/s", UiTools.FormateMoney(CampsiteMgr.singleton.TotalRewardRate));

            CampValue.text.text  = CampsiteMgr.singleton.Id.ToString();
            LevelValue.text.text = PlayerDataMgr.singleton.GetPlayerLevel().ToString();
            DPSValue.text.text   = (PlayerDataMgr.singleton.GetUseWeaponPower() /
                                    TableMgr.singleton.ValueTable.combat_capability).ToString("f0");

            Dictionary <CombatAttr.CombatAttrType, float> attrDic = new Dictionary <CombatAttr.CombatAttrType, float>();
            var skills = PlayerDataMgr.singleton.GetFuseSkills();

            for (int i = 0; i < skills.Count; ++i)
            {
                var data = TableMgr.singleton.FuseGunSkillTable.GetItemByID(skills[i]);
                if (data == null)
                {
                    continue;
                }

                var type = (CombatAttr.CombatAttrType)(data.id / 100);
                if (!attrDic.ContainsKey(type))
                {
                    attrDic[type] = data.value;
                }
                else
                {
                    attrDic[type] += data.value;
                }
            }

            var life = Mathf.Ceil(TableMgr.singleton.ValueTable.player_levelup_hp_k1 *
                                  Mathf.Pow((1 + TableMgr.singleton.ValueTable.player_levelup_hp_k2),
                                            (PlayerDataMgr.singleton.GetPlayerLevel() - 1)));

            var value = 0.0f;

            if (attrDic.TryGetValue(CombatAttr.CombatAttrType.Life_Add, out value))
            {
                life *= (1.0f + value);
            }

            HpValue.text.text = life.ToString("f0");
            ///////////////////////////////////////////////////////////
            var atk = PlayerDataMgr.singleton.GetUseWeaponAtk();

            value = 0.0f;
            if (attrDic.TryGetValue(CombatAttr.CombatAttrType.Attack, out value))
            {
                atk += value;
            }

            value = 0.0f;
            if (attrDic.TryGetValue(CombatAttr.CombatAttrType.Attack_Add, out value))
            {
                atk *= (1.0f + value);
            }

            AtkValue.text.text = atk.ToString("f0");
            /////////////////////////////////////////////////////////
            var speed = 1.0f;

            value = 0.0f;
            if (attrDic.TryGetValue(CombatAttr.CombatAttrType.MoveSpeed, out value))
            {
                speed += value;
            }

            SpeedValue.text.text = speed.ToString("f0");
            /////////////////////////////////////////////////////////
            var crit = 1.0f;

            value = 0.0f;
            if (attrDic.TryGetValue(CombatAttr.CombatAttrType.Crit_Rate, out value))
            {
                crit += value;
            }

            CritValue.text.text = crit.ToString("f0");
            /////////////////////////////////////////////////////////
            var critDamage = 1.0f;

            value = 0.0f;
            if (attrDic.TryGetValue(CombatAttr.CombatAttrType.Crit_Damage, out value))
            {
                critDamage += value;
            }

            CritDamageValue.text.text = critDamage.ToString("f0");
            /////////////////////////////////////////////////////////
            var dodge = 1.0f;

            value = 0.0f;
            if (attrDic.TryGetValue(CombatAttr.CombatAttrType.Dodge, out value))
            {
                dodge += value;
            }

            DodgeValue.text.text = critDamage.ToString("f0");
            /////////////////////////////////////////////////////////
            var atkSpeed = 1.0f;

            value = 0.0f;
            if (attrDic.TryGetValue(CombatAttr.CombatAttrType.Attack_Speed, out value))
            {
                atkSpeed += value;
            }

            AtkSpeedValue.text.text = atkSpeed.ToString("f0");
            /////////////////////////////////////////////////////////
        }
Пример #16
0
 public void Fresh(double val)
 {
     RewardCount.text.text = UiTools.FormateMoney(val);
 }
Пример #17
0
        private void RefreshData()
        {
            if (pointDataMgr == null)
            {
                return;
            }
            if (pointDataMgr.isFrozen)
            {
                LockRoot.gameObject.SetActive(false);
                UnlockRoot.gameObject.SetActive(false);
            }
            else
            {
                if (!pointDataMgr.isUnlock)
                {
                    LockRoot.gameObject.SetActive(true);
                    UnlockRoot.gameObject.SetActive(false);
                }
                else
                {
                    LockRoot.gameObject.SetActive(false);
                    UnlockRoot.gameObject.SetActive(true);
                    var reward = pointDataMgr.SettlementRewardVal;
                    if (reward > 0)
                    {
                        RewardCount.text.text = UiTools.FormateMoney(reward);
                        RewardNode.gameObject.SetActive(true);
                    }
                    else
                    {
                        RewardNode.gameObject.SetActive(false);
                    }

                    if (pointDataMgr.equipGunId > 0)
                    {
                        var cardRes = TableMgr.singleton.GunCardTable.GetItemByID(pointDataMgr.equipGunId);
                        CardIconImg.image.sprite = Global.gApp.gResMgr.LoadAssets <Sprite>(cardRes.icon);
                        CardIconImg.gameObject.SetActive(true);
                    }
                    else
                    {
                        CardIconImg.gameObject.SetActive(false);
                    }

                    if (pointDataMgr.isAuto)
                    {
                        if (nonAutoAnim.tween.IsPlaying())
                        {
                            nonAutoAnim.DORewind();
                        }
                        ProgressImg.image.color = autoColor;
                    }
                    else
                    {
                        ProgressImg.image.color = nonAutoColor;
                    }

                    if (PlayerDataMgr.singleton.ModuleIsOpen(GameModuleType.BuildSetGun) &&
                        CampsiteMgr.singleton.PointCanSetGun(pointDataMgr.index))
                    {
                        RedPoint.gameObject.SetActive(true);
                    }
                    else
                    {
                        RedPoint.gameObject.SetActive(false);
                    }

                    RewardFlag.gameObject.SetActive(!pointDataMgr.isFight);
                }
            }
        }
Пример #18
0
        public void UIFresh()
        {
            if (m_ItemConfig == null)
            {
                return;
            }
            if (Global.gApp.gSystemMgr.GetWeaponMgr().GetCurMainWeapon().Equals(m_ItemConfig.name))
            {
                Equip.gameObject.SetActive(true);
                EquipBg.gameObject.SetActive(true);
            }
            else
            {
                Equip.gameObject.SetActive(false);
                EquipBg.gameObject.SetActive(false);
            }
            if (Global.gApp.gSystemMgr.GetWeaponMgr().GetQualityLv(m_ItemConfig) == 0)
            {
                WeaponIcon.image.sprite = Resources.Load(m_ItemConfig.image_grow, typeof(Sprite)) as Sprite;
            }
            else
            {
                WeaponIcon.image.sprite = Resources.Load(m_ItemConfig.image_grow + "_s", typeof(Sprite)) as Sprite;
            }
            WeaponNameTxt.text.text = m_ItemConfig.gamename;

            gameObject.SetActive(true);
            UnlockBtn.gameObject.SetActive(false);
            if (!Global.gApp.gSystemMgr.GetWeaponMgr().GetWeaponOpenState(m_ItemConfig))
            {
                if (m_ItemConfig.opencondition[0] == FilterTypeConstVal.CUR_ITEM_NUM)
                {
                    Mask1.gameObject.SetActive(true);
                    MaskTxt.gameObject.SetActive(false);
                    MaskTxt.text.text = FilterFactory.GetInstance().GetUnfinishTips(m_ItemConfig.opencondition);
                    UnlockBtn.gameObject.SetActive(true);
                    u_CmNum.text.text     = UiTools.FormateMoney(m_ItemConfig.opencondition[2]);
                    u_CmNum.text.color    = ColorUtil.GetTextColor(GameItemFactory.GetInstance().GetItem((int)m_ItemConfig.opencondition[1]) < m_ItemConfig.opencondition[2], null);
                    u_CmIcon.image.sprite = Global.gApp.gResMgr.LoadAssets <Sprite>(string.Format(CommonResourceConstVal.RESOURCE_PATH, m_ItemConfig.opencondition[1]));
                }
                else
                {
                    Mask1.gameObject.SetActive(true);
                    MaskTxt.gameObject.SetActive(true);
                    MaskTxt.text.text = FilterFactory.GetInstance().GetUnfinishTips(m_ItemConfig.opencondition);
                }


                Equip.gameObject.SetActive(false);
                EquipBg.gameObject.SetActive(false);
                WeaponNameTxt.gameObject.SetActive(false);
                WeaponLvTxt.gameObject.SetActive(false);
                Param1NameTxt.gameObject.SetActive(false);
                UpBtn.gameObject.SetActive(false);

                WeaponIcon.image.color = ColorUtil.GetColor(ColorUtil.m_BlackColor);
            }
            else
            {
                Mask1.gameObject.SetActive(false);

                WeaponNameTxt.gameObject.SetActive(true);
                WeaponLvTxt.gameObject.SetActive(true);
                Param1NameTxt.gameObject.SetActive(true);
                UpBtn.gameObject.SetActive(true);

                WeaponIcon.image.color = ColorUtil.GetColor(ColorUtil.m_DeaultColor);

                //新获得的武器显示特效
                if (Global.gApp.gSystemMgr.GetWeaponMgr().GetWeaponOpenState(m_ItemConfig.name) == WeaponStateConstVal.NEW)
                {
                    NewWeapon.gameObject.SetActive(true);
                    NewIMG.gameObject.SetActive(true);
                }
            }


            int           gunLevel        = Global.gApp.gSystemMgr.GetWeaponMgr().GetWeaponLevel(m_ItemConfig.name);
            Guns_dataItem weaponLevelData = Global.gApp.gGameData.GunDataConfig.Get(gunLevel);

            double[] costValue = ReflectionUtil.GetValueByProperty <Guns_dataItem, double[]>(m_ItemConfig.name + "_cost", weaponLevelData);
            if ((int)costValue[0] != SpecialItemIdConstVal.REAL_MONEY)
            {
                CmNum.text.color = ColorUtil.GetTextColor(GameItemFactory.GetInstance().GetItem((int)costValue[0]) < costValue[1], m_CM_COLOR);
            }

            //可升级提示
            if (Global.gApp.gSystemMgr.GetWeaponMgr().CanUpdateWeapon(m_ItemConfig))
            {
                WeaponUp.gameObject.SetActive(true);
            }
            else
            {
                WeaponUp.gameObject.SetActive(false);
            }

            Guns_dataItem nextLevelCfg = Global.gApp.gGameData.GunDataConfig.Get(gunLevel + 1);

            double[] weaponParams = null;
            if (nextLevelCfg != null)
            {
                weaponParams = ReflectionUtil.GetValueByProperty <Guns_dataItem, double[]>(m_ItemConfig.name, nextLevelCfg);
            }
            bool max = weaponParams == null || weaponParams.Length == 0;

            CmIcon.gameObject.SetActive(!max);
            CmNum.gameObject.SetActive(!max);
            dotxt.gameObject.SetActive(!max);
            MaxTxt.gameObject.SetActive(max);

            if (m_ItemConfig.opencondition[0] == FilterTypeConstVal.WEAPON_UNLOCK)
            {
                u_CmNum.text.text     = UiTools.FormateMoney(m_ItemConfig.opencondition[2]);
                u_CmNum.text.color    = ColorUtil.GetTextColor(GameItemFactory.GetInstance().GetItem((int)m_ItemConfig.opencondition[1]) < m_ItemConfig.opencondition[2], null);
                u_CmIcon.image.sprite = Global.gApp.gResMgr.LoadAssets <Sprite>(string.Format(CommonResourceConstVal.RESOURCE_PATH, m_ItemConfig.opencondition[1]));
            }
        }
Пример #19
0
        private void Deal4Level(ItemItem itemConfig)
        {
            m_ItemConfig = itemConfig;
            int gunLevel     = Global.gApp.gSystemMgr.GetWeaponMgr().GetWeaponLevel(itemConfig.name);
            int gunShowLevel = Global.gApp.gSystemMgr.GetWeaponMgr().GetWeaponShowLevel(itemConfig.name);

            WeaponLvTxt.text.text = "lv: " + gunShowLevel;
            Guns_dataItem weaponLevelData = Global.gApp.gGameData.GunDataConfig.Get(gunLevel);


            double[] costValue = ReflectionUtil.GetValueByProperty <Guns_dataItem, double[]>(itemConfig.name + "_cost", weaponLevelData);
            CmNum.text.text     = UiTools.FormateMoney(costValue[1]);
            CmNum.text.color    = ColorUtil.GetTextColor(GameItemFactory.GetInstance().GetItem((int)costValue[0]) < costValue[1], m_CM_COLOR);
            CmIcon.image.sprite = Global.gApp.gResMgr.LoadAssets <Sprite>(string.Format(CommonResourceConstVal.RESOURCE_PATH, costValue[0]));
            m_ConsumItemId      = (int)costValue[0];
            double[] paramValue;
            if (Global.gApp.gSystemMgr.GetWeaponMgr().GetQualityLv(m_ItemConfig) == 0)
            {
                paramValue = ReflectionUtil.GetValueByProperty <Guns_dataItem, double[]>(itemConfig.name, weaponLevelData);
                double showVal = itemConfig.showParam / itemConfig.dtime * paramValue[0];
                Param1Txt.text.text = UiTools.FormateMoney(showVal);
            }
            else
            {
                paramValue = ReflectionUtil.GetValueByProperty <Guns_dataItem, double[]>(itemConfig.name + "_super", weaponLevelData);
                double showVal = itemConfig.showParam / itemConfig.dtime * paramValue[0];
                Param1Txt.text.text = UiTools.FormateMoney(showVal);
            }
            if (paramValue.Length <= 1)
            {
                Param2Txt.text.text = "None";
            }
            else
            {
                Param2Txt.text.text = paramValue[1].ToString();
            }
            m_WeaponName = itemConfig.name;
            int m_QualityLevel            = itemConfig.qualevel;
            GeneralConfigItem colorConfig = Global.gApp.gGameData.GeneralConfigData.Get(GeneralConfigConstVal.QUALITY_COLOR);

            WeaponNameTxt.text.color = ColorUtil.GetColor(colorConfig.contents[m_QualityLevel]);
            WeaponBg.image.sprite    = Resources.Load(string.Format(CommonResourceConstVal.WEAPON_BG_PATH, m_QualityLevel), typeof(Sprite)) as Sprite;

            if (m_QualityLevel > 0)
            {
                EffectItem effectItem = Global.gApp.gGameData.EffectData.Get(EffectConstVal.QUALITY);
                GameObject effect     = UiTools.GetEffect(string.Format(effectItem.path, m_QualityLevel), transform);
                if (mEffect != null)
                {
                    GameObject.Destroy(mEffect);
                }
                mEffect = effect;
                mEffect.transform.SetParent(WeaponIcon.rectTransform, true);
                if (m_IconParentNode == null)
                {
                    m_IconParentNode = WeaponIcon.gameObject.transform.parent;
                    WeaponIcon.gameObject.GetComponent <WeaponUI_Item_Follow>().SetFollowNode(m_IconParentNode);
                    WeaponIcon.gameObject.transform.SetParent(m_Parent.GetViewPoint2().transform, true);
                }
            }

            //if (m_QualityLevel < itemConfig.qualevel.Length - 1 && gunLevel - itemConfig.qualevel[m_QualityLevel] <= itemConfig.qualevel[m_QualityLevel + 1] - itemConfig.qualevel[m_QualityLevel])
            //{
            //    LvPro.image.fillAmount = (float)(gunLevel - itemConfig.qualevel[m_QualityLevel]) / (itemConfig.qualevel[m_QualityLevel + 1] - itemConfig.qualevel[m_QualityLevel]);
            //}
            //else if (m_QualityLevel >= itemConfig.qualevel.Length - 1)
            //{
            //    LvPro.image.fillAmount = 0;
            //}
            //else
            //{
            //    LvPro.image.fillAmount = 1;
            //}
        }
        public void UIFresh()
        {
            if (m_ItemConfig == null)
            {
                return;
            }
            int lv                 = Global.gApp.gSystemMgr.GetWeaponMgr().GetWeaponLevel(m_ItemConfig.name);
            int state              = Global.gApp.gSystemMgr.GetWeaponMgr().GetWeaponOpenState(m_ItemConfig.name);
            int filterType         = Convert.ToInt32(m_ItemConfig.opencondition[0]);
            GunsSub_dataItem lvCfg = Global.gApp.gGameData.GunSubDataConfig.Get(lv);

            //SubLvtxt
            //passProgress
            //BtnUnlock
            //BtnUpgrade
            //Unlocktxt
            //Moneyiconbtn
            //Moneycostbtn
            //m_Lock
            //SubWeaponIcon

            bottom.image.sprite = Global.gApp.gResMgr.LoadAssets <Sprite>(string.Format(CommonResourceConstVal.SUB_BOTTOM, m_ItemConfig.qualevel));
            if (Effect.rectTransform.childCount == 0)
            {
                EffectItem effectItem = Global.gApp.gGameData.EffectData.Get(EffectConstVal.SUB_EFFECT);
                GameObject effect     = UiTools.GetEffect(string.Format(effectItem.path, m_ItemConfig.qualevel), Effect.rectTransform);
            }
            PetWeaponBg.image.sprite = Global.gApp.gResMgr.LoadAssets <Sprite>(string.Format(CommonResourceConstVal.SUB_BG, m_ItemConfig.qualevel));

            if (filterType != FilterTypeConstVal.CUR_ITEM_NUM)
            {
                //if (state == WeaponStateConstVal.NONE && FilterFactory.GetInstance().Filter(m_ItemConfig.opencondition))
                //{
                //    state = WeaponStateConstVal.NEW;
                //    Global.gApp.gSystemMgr.GetWeaponMgr().SetWeaponOpenState(m_ItemConfig.name, state);
                //}
                //应该显示解锁
                bool unLock = state == WeaponStateConstVal.NEW || state == WeaponStateConstVal.EXIST;
                PetLvtxt.gameObject.SetActive(unLock);
                progress_bg.gameObject.SetActive(false);
                BtnUnlock.gameObject.SetActive(false);
                BtnUpgrade.gameObject.SetActive(unLock);
                Unlocktxt.gameObject.SetActive(!unLock);
                Moneyiconbtn.gameObject.SetActive(unLock);
                Moneycostbtn.gameObject.SetActive(unLock);
                m_Lock.gameObject.SetActive(!unLock);
                PetWeaponIcon.gameObject.SetActive(true);
                PetWeaponIcon.image.color = unLock ? ColorUtil.GetColor(ColorUtil.m_DeaultColor) : ColorUtil.GetColor(ColorUtil.m_WhiteColor);
                AtkMsg.gameObject.SetActive(unLock);
            }
            else
            {
                //应该显示解锁
                bool unLock = state == WeaponStateConstVal.NEW || state == WeaponStateConstVal.EXIST;
                PetLvtxt.gameObject.SetActive(unLock);
                progress_bg.gameObject.SetActive(false);
                BtnUnlock.gameObject.SetActive(!unLock);
                BtnUpgrade.gameObject.SetActive(unLock);
                Unlocktxt.gameObject.SetActive(false);
                Moneyiconbtn.gameObject.SetActive(true);
                Moneycostbtn.gameObject.SetActive(true);
                m_Lock.gameObject.SetActive(!unLock);
                PetWeaponIcon.gameObject.SetActive(true);
                PetWeaponIcon.image.color = unLock ? ColorUtil.GetColor(ColorUtil.m_DeaultColor) : ColorUtil.GetColor(ColorUtil.m_WhiteColor);
                AtkMsg.gameObject.SetActive(unLock);
            }

            Unlocktxt.text.text = FilterFactory.GetInstance().GetMiddleUnfinishTips(m_ItemConfig.opencondition);
            PetLvtxt.text.text  = "LV:" + lv;
            if (lvCfg != null)
            {
                if (filterType == FilterTypeConstVal.CUR_ITEM_NUM && state == WeaponStateConstVal.NONE)
                {
                    int    itemId        = Convert.ToInt32(m_ItemConfig.opencondition[1]);
                    double unlockItemNum = Convert.ToDouble(m_ItemConfig.opencondition[2]);
                    m_ReduceItemDTO = new ItemDTO(itemId, unlockItemNum, BehaviorTypeConstVal.OPT_WEAPON_UNLOCK);
                    double itemCount = GameItemFactory.GetInstance().GetItem(itemId);
                    passProgress.image.fillAmount = (float)(itemCount / unlockItemNum);
                    Moneyiconbtn.image.sprite     = Global.gApp.gResMgr.LoadAssets <Sprite>(string.Format(CommonResourceConstVal.RESOURCE_PATH, itemId));
                    Moneycostbtn.text.text        = UiTools.FormateMoney(unlockItemNum);
                    Moneycostbtn.text.color       = ColorUtil.GetTextColor(itemCount < unlockItemNum, null);
                }
                else
                {
                    double[] costValue     = ReflectionUtil.GetValueByProperty <GunsSub_dataItem, double[]>("base_cost_" + m_ItemConfig.qualevel, lvCfg);
                    int      itemId        = Convert.ToInt32(costValue[0]);
                    double   unlockItemNum = Convert.ToDouble(costValue[1]);
                    m_ReduceItemDTO = new ItemDTO(itemId, unlockItemNum, BehaviorTypeConstVal.OPT_WEAPON_LEVEL_UP);
                    double itemCount = GameItemFactory.GetInstance().GetItem(itemId);
                    passProgress.image.fillAmount = (float)(itemCount / unlockItemNum);
                    Moneyiconbtn.image.sprite     = Global.gApp.gResMgr.LoadAssets <Sprite>(string.Format(CommonResourceConstVal.RESOURCE_PATH, itemId));
                    Moneycostbtn.text.text        = UiTools.FormateMoney(unlockItemNum);
                    Moneycostbtn.text.color       = ColorUtil.GetTextColor(itemCount < unlockItemNum, null);
                }
                double[] prm = ReflectionUtil.GetValueByProperty <GunsSub_dataItem, double[]>("base_params_" + m_ItemConfig.qualevel, lvCfg);
                Atk.text.text = string.Format("{0}%", (prm[0] * 100).ToString());
                if (Global.gApp.gGameData.GunSubDataConfig.Get(lv + 1) == null)
                {
                    MaxLevel(lv);
                }
            }
            else
            {
                MaxLevel(lv);
            }


            PetUp.gameObject.SetActive(Global.gApp.gSystemMgr.GetWeaponMgr().CanUpdateWeapon(m_ItemConfig));
            NewPet.gameObject.SetActive(state == WeaponStateConstVal.NEW);
            NewIMG_pet.gameObject.SetActive(state == WeaponStateConstVal.NEW);
        }