Beispiel #1
0
 void ShowCopperCoinLabel(float number)
 {
     currentCoppercoin = (int)number;
     if (number > 9999999)
     {
         CopperCoinBtn.SetButtonText("9999999+");
     }
     else
     {
         CopperCoinBtn.SetButtonText(((int)number).ToString());
     }
 }
Beispiel #2
0
 void showGoldMoneyLabel(float number)
 {
     currentGoldMoney = (int)number;
     if (number > 9999999)
     {
         GoldMoneyBtn.SetButtonText("9999999+");
     }
     else
     {
         GoldMoneyBtn.SetButtonText(((int)number).ToString());
     }
 }
Beispiel #3
0
        void InitItem()
        {
            IconPoint.ClearChild();
            CreatObjectToNGUI.InstantiateObj(MyItem.LocalItemData._picPrefab, IconPoint);
            QualityBackground.ChangeSprite(MyItem.LocalItemData._ColorLevel + 2);
            int StrengthLevel = PlayerDataManager.Instance.GetEquipmentStrengthLevel((EquiptSlotType)MyItem.sSyncContainerGoods_SC.nPlace);
            int StarLevel     = PlayerDataManager.Instance.GetEquipmentStarLevel((EquiptSlotType)MyItem.sSyncContainerGoods_SC.nPlace);

            if (StarLevel > 0)
            {
                int par = (StarLevel - 1) / 10 + 1;
                Sps_star.ChangeSprite(par);
                Sps_star.gameObject.SetActive(true);
            }
            else
            {
                Sps_star.gameObject.SetActive(false);
            }

            if (StrengthLevel > 0)
            {
                Go_Strength.SetButtonText("+" + StrengthLevel);
                Go_Strength.gameObject.SetActive(true);
            }
            else
            {
                Go_Strength.gameObject.SetActive(false);
            }
        }
Beispiel #4
0
    //更新某个武学信息
    public void UpdateInfo(int martialId)
    {
        MartialId    = martialId;
        MartialLevel = PlayerMartialDataManager.Instance.GetMartialLevelByID(martialId);
        MartialIndex martialIndex = new MartialIndex()
        {
            MartialArtsID = MartialId, MartialArtsLevel = MartialLevel
        };

        MartialData = PlayerDataManager.Instance.GetPlayerMartialArtConfigData(martialIndex);
        IconBG.GetComponent <SpriteSwith>().ChangeSprite(MartialLevel <= 1 ? 1 : MartialLevel);
        IconPoint.ClearChild();
        GameObject icon = UI.CreatObjectToNGUI.InstantiateObj(MartialData.MartialArtsIconPrefab, IconPoint);

        MartialNameLabel.text   = LanguageTextManager.GetString(MartialData.MartialArtsName);
        MartialDesLabel.text    = LanguageTextManager.GetString(MartialData.MartialArtsDes);
        MartialEffDesLabel.text = LanguageTextManager.GetString(MartialData.MartialArtsParamDes);
        NeedConLabel.text       = MartialData.MartialArtsContribution.ToString();

        if (MartialLevel == 0)          //没解锁
        {
            EffBackground.transform.localScale = new Vector3(292, 74, 0);
            ConBackground.transform.localScale = new Vector3(292, 176, 0);
            LineMartialLevel.SetActive(false);
            LineHonor.SetActive(true);
            LineLearnLabel.SetActive(true);
            LineUpgradeLabel.SetActive(false);
            MaxHonorN.text     = LanguageTextManager.GetString("IDS_I38_23");
            MaxHonorLabel.text = MartialData.MartialArtsMaxScore.ToString();
            NeedConN.text      = LanguageTextManager.GetString("IDS_I38_24");
            //Button.GetComponentInChildren<UILabel>().text = LanguageTextManager.GetString("IDS_I38_26");	//学习
            Button.SetButtonText(LanguageTextManager.GetString("IDS_I38_26"));
        }
        else         //已解锁
        {
            EffBackground.transform.localScale = new Vector3(292, 115, 0);
            ConBackground.transform.localScale = new Vector3(292, 137, 0);
            LineMartialLevel.SetActive(true);
            LineHonor.SetActive(false);
            LineLearnLabel.SetActive(false);
            LineUpgradeLabel.SetActive(true);
            MartialLevelN.text     = LanguageTextManager.GetString("IDS_I38_25");
            MartialLevelLabel.text = MartialLevel.ToString() + "/" + MartialData.MartialArtsMaxLevels;
            //Button.GetComponentInChildren<UILabel>().text = LanguageTextManager.GetString("IDS_I38_27");	//升级
            Button.SetButtonText(LanguageTextManager.GetString("IDS_I38_27"));
        }
    }
Beispiel #5
0
        void UpdateStatu()
        {
            CreatObjectToNGUI.InstantiateObj(MyItemFileInfo.LocalItemData._picPrefab, CreatItemIconPoint);
            QualityBackground.gameObject.SetActive(true);
            QualityBackground.ChangeSprite(MyItemFileInfo.LocalItemData._ColorLevel + 2);

            if (MyItemFileInfo.LocalItemData._GoodsClass == 1)
            {
                switch (GetBestItem.GetEquipItemStatus(MyItemFileInfo))
                {
                case EquipButtonType.CanEquip:
//					var strengLevel = EquipItem.GetItemInfoDetail(MyItemFileInfo,EquipInfoType.EquipStrenLevel);
//					if(strengLevel!="+0")
//					{
//						StrengthenLevelLabel.gameObject.SetActive(true);
//						StrengthenLevelLabel.SetButtonText(strengLevel);
//
//					}
//                        var StartLevel= EquipItem.GetItemInfoDetail(MyItemFileInfo,EquipInfoType.EquipStarLevel);
//                        if(StartLevel!="0")
//                        {
//
//                            EquiptStartSprite.ChangeSprite(int.Parse(StartLevel));
//                        }
                    break;

                case EquipButtonType.LVNotEnough:

                    NeedLabel.gameObject.SetActive(true);
                    NeedLabel.SetButtonText(string.Format(LanguageTextManager.GetString("IDS_I1_22"), MyItemFileInfo.LocalItemData._AllowLevel));
                    break;

                case EquipButtonType.ProfesionNotEnough:
                    NeedLabel.gameObject.SetActive(true);
                    NeedLabel.SetButtonText(GetVocation());
                    break;
                }
            }

            if (MyItemFileInfo.sSyncContainerGoods_SC.byNum > 1)
            {
                ItemNumLabel.gameObject.SetActive(true);
                ItemNumLabel.SetButtonText(MyItemFileInfo.sSyncContainerGoods_SC.byNum.ToString());
            }
//            //第一个判断是“是装备”,第二个判断是“两个孔都有器魂”,第三个判断是“第一个器魂与第二个器魂不是相同id的”,第四/五个判断是“器魂套装id不等于0且第一个套装id等于第二个套装id”,
//            if(MyItemFileInfo.LocalItemData._GoodsClass==1&&(MyItemFileInfo.GetIfBesetJewel(1)&&MyItemFileInfo.GetIfBesetJewel(2))&&MyItemFileInfo.GetJewelIndex(1)!=MyItemFileInfo.GetJewelIndex(2)&& MyItemFileInfo.GetJewel(1).StoneGrop!=0&&MyItemFileInfo.GetJewel(1).StoneGrop==MyItemFileInfo.GetJewel(2).StoneGrop)
//			{
//				ShowBesetjewelEff();
//			}
//			else
//			{
//				HideBesetjewelEff();
//			}
            if (MyItemFileInfo.LocalItemData._GoodsClass == 3 && MyItemFileInfo.LocalItemData._GoodsSubClass == 3)     //器魂
            {
                NeedLabel.gameObject.SetActive(true);
                NeedLabel.SetButtonText("Lv." + MyItemFileInfo.materiel.ESTORE_FIELD_LEVEL);              //临时
            }
        }
Beispiel #6
0
 public void Awake()
 {
     Close();
     SureBtn.SetButtonText(LanguageTextManager.GetString("IDS_H2_55"));
     CancelBtn.SetButtonText(LanguageTextManager.GetString("IDS_H2_28"));
     SureBtn.SetCallBackFuntion(OnSureBtnClick);
     CancelBtn.SetCallBackFuntion(OnCancelBtnClick);
 }
Beispiel #7
0
 public void ShowPanel(string Msg, int Type, int PayNumber, ButtonCallBack SureBtnCallBack)
 {
     Show();
     MsgTitle.SetText(Msg);
     IconBtn.SetButtonBackground(Type - 1);
     IconBtn.SetButtonText(PayNumber.ToString());
     this.SureBtnCallBack = SureBtnCallBack;
 }
Beispiel #8
0
        public void Show(string resName, int level)
        {
            bool isUnLock = level > 0;

            SirenIcon.spriteName = resName;
            LevelLabel.SetButtonText(string.Format("Lv.{0}", level.ToString()));
            LevelLabel.gameObject.SetActive(isUnLock);
            Background.color = SirenIcon.color = isUnLock?Color.white:Color.gray;
        }
Beispiel #9
0
        void UpdateLabel()
        {
            int atk = HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_Combat, PlayerManager.Instance.FindHeroDataModel().UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_FIGHTING);

            MyAtkForceLabel.SetButtonText(atk.ToString());
            SeggesionForcelabel.SetButtonText(CurrentSelectEctypeContaienrData.FightingCapacity.ToString());
            JoinTackLabel.spriteSwith.ChangeSprite(CurrentSelectEctypeContaienrData.lCostType);
            JoinTackLabel.SetButtonText(CurrentSelectEctypeContaienrData.lCostEnergy);
        }
Beispiel #10
0
        void Init(object obj)
        {
            GameDataManager.Instance.dataEvent.RemoveEventHandel(DataType.InitializeEctype, Init);
            SMSGEctypeInitialize_SC sMSGEctypeInitialize_SC = (SMSGEctypeInitialize_SC)GameDataManager.Instance.PeekData(DataType.InitializeEctype);

            EctypeData = EctypeConfigManager.Instance.EctypeContainerConfigList[sMSGEctypeInitialize_SC.dwEctypeContainerId];
            EctypeNameLabel.SetText(LanguageTextManager.GetString(EctypeData.lEctypeName));
            SuggestionPesionLabel.SetButtonText(string.Format(LanguageTextManager.GetString("IDS_H1_501"), EctypeData.PlayerNum));
        }
Beispiel #11
0
        }                                                             //已经拥有的时装列表

        void Awake()
        {
            HelpTips.SetButtonText(LanguageTextManager.GetString("IDS_I8_2"));
            //MainUIController.Instance.SetPanelActivEvent += new MainUIController.SetPanelDelegate(SetPanelActive);
            AddEventHandler(EventTypeEnum.EntityUpdateValues.ToString(), UpdateViaNotify);
            UIEventManager.Instance.RegisterUIEvent(UIEventType.ResetContainerGoods, SetPanelAttribute);
            BackButton.SetCallBackFuntion(OnBackButtonTapped);
            RegisterEventHandler();
            TaskGuideBtnRegister();
        }
Beispiel #12
0
 public void Show(string meridiansName, string addEffName, string addEffNum, string NeedAddNumber)
 {
     //TraceUtil.Log("显示两个");
     TwoAtbSprite.enabled   = false;
     ThreeAtbSprite.enabled = true;
     NeedLabel.gameObject.SetActive(true);
     NameLabel.SetText(meridiansName);
     AtbNameLabel.SetText(addEffName);
     AtbNumberLabel.SetText("+" + addEffNum);
     NeedLabel.SetButtonText(NeedAddNumber);
 }
Beispiel #13
0
        IEnumerator ShowTimeLeftLabel(int leftTime)
        {
            TimeLeftLabel.SetButtonText(leftTime.ToString());
            yield return(new WaitForSeconds(1));

            if (leftTime > 0)
            {
                leftTime--;
                StartCoroutine(ShowTimeLeftLabel(leftTime));
            }
        }
Beispiel #14
0
    void Updatelabel()
    {
        string leftValue  = GetPropertyAmount(m_leftType);
        string rightValue = GetPropertyAmount(m_rightType);

        //string VigroupValue = GetPropertyAmount(CommonTitleType.Power);
        LeftAddBtn.SetButtonText(leftValue);
        RightAddBtn.SetButtonText(rightValue);

        VigourAddBtn.SetButtonText(leftValue);
    }
Beispiel #15
0
        void ShowCostTipsAndJoin()
        {
            int costNumber            = int.Parse(LocalEctypeData.lCostEnergy);
            SingleButtonCallBack Tips = CreatObjectToNGUI.InstantiateObj(CostLabelPreafab, GoButton.transform).GetComponent <SingleButtonCallBack>();
            Vector3 fromPoint         = new Vector3(0, 50, -30);
            Vector3 toPoint           = new Vector3(0, 0, -30);

            TweenPosition.Begin(Tips.gameObject, 0.5f, fromPoint, toPoint, SendGoBattleToServer);
            TweenAlpha.Begin(Tips.gameObject, 0.5f, 1, 0, null);
            Tips.SetButtonBackground(LocalEctypeData.lCostType);
            Tips.SetButtonText(string.Format("-{0}", costNumber));
        }
Beispiel #16
0
 public void Init(EctypeSelectConfigData configData, EctypeDiffListPanel myParent)
 {
     MyParent     = myParent;
     MyConfigData = configData;
     LockIcon.gameObject.SetActive(IsLock);
     NameLabel.gameObject.SetActive(!IsLock);
     if (!IsLock)
     {
         m_IconSprite = CreatObjectToNGUI.InstantiateObj(configData._EctypeIconPrefab, EctypeIconPos).GetComponent <UISprite>();
         NameLabel.SetButtonText(LanguageTextManager.GetString(configData._szName));
     }
 }
Beispiel #17
0
        void Awake()
        {
            AddBtn.SetPressCallBack(OnAddBtnPress);
            AddBtn.SetCallBackFuntion(OnAddBtnClick);
            CutBtn.SetPressCallBack(OnCutBtnPress);
            CutBtn.SetCallBackFuntion(OnCutBtnClick);
            SureBtn.SetCallBackFuntion(OnSureButtonClick);
            CancelBtn.SetCallBackFuntion(OnCancelButtonClick);

            SureBtn.SetButtonText(LanguageTextManager.GetString("IDS_H2_55"));
            CancelBtn.SetButtonText(LanguageTextManager.GetString("IDS_H2_28"));
            ClosePanel();
        }
Beispiel #18
0
        /// <summary>
        /// 在按钮上方显示花费tips
        /// </summary>
        void ShowCostLabelInButton()
        {
            if (IsShowCostLabel)
            {
                return;
            }
            EctypeContainerData SelectContainerData = OnSelectEctypeCard.ectypeContainerData;
            bool isShowCostType  = true;
            int  localCostNumber = int.Parse(OnSelectEctypeCard.ectypeContainerData.lCostEnergy);
            int  costNumber      = 0;

            switch (SelectContainerData.lCostType)
            {
            case 1:
                costNumber     = PlayerManager.Instance.FindHeroDataModel().PlayerValues.PLAYER_FIELD_CURRENCY_ACTIVELIFE;
                isShowCostType = costNumber > 0 && localCostNumber > 0;
                break;

            case 2:
                costNumber     = PlayerManager.Instance.FindHeroDataModel().PlayerValues.PLAYER_FIELD_BINDPAY;
                isShowCostType = costNumber > 0 && localCostNumber > 0;
                break;

            case 3:
                costNumber     = PlayerManager.Instance.FindHeroDataModel().PlayerValues.PLAYER_FIELD_HOLDMONEY;
                isShowCostType = costNumber > 0 && localCostNumber > 0;
                break;

            default:
                break;
            }
            if (isShowCostType)
            {
                SingleButtonCallBack Tips = CreatObjectToNGUI.InstantiateObj(CostLabelPreafab, BtnGo.transform).GetComponent <SingleButtonCallBack>();
                Vector3 fromPoint         = new Vector3(0, 50, -30);
                Vector3 toPoint           = new Vector3(0, 0, -30);
                TweenPosition.Begin(Tips.gameObject, 0.5f, fromPoint, toPoint, null);
                TweenAlpha.Begin(Tips.gameObject, 0.5f, 1, 0, null);
                Tips.SetButtonBackground(OnSelectEctypeCard.ectypeContainerData.lCostType);
                Tips.SetButtonText(string.Format("-{0}", costNumber > localCostNumber?localCostNumber:costNumber));
            }
            //else
            //{
            //    SendGoBattleToServer(null);
            //}
            DoForTime.DoFunForTime(1.5f, SendGoBattleToServer, null);
            SoundManager.Instance.PlaySoundEffect("Sound_Button_Fight");
            StartCoroutine(SetShowCostLabelFalseForTime(1.5f));
            LoadingUI.Instance.Show();
        }
Beispiel #19
0
        void OnQuarterHealthClick(object obj)
        {
            int CurrentMoney = PlayerManager.Instance.FindHeroDataModel().PlayerValues.PLAYER_FIELD_HOLDMONEY;

            TraceUtil.Log("玩家当前铜币:" + CurrentMoney);
            if (CurrentMoney < QuarteHealthPay)
            {
                GrayButton(QuarterHealthResurgenceBtn);
                QuarterHealthResurgenceBtn.SetButtonText(LanguageTextManager.GetString("IDS_H2_35"));//("铜币不足");
            }
            else
            {
                SendQuarterHealthToSever();
            }
        }
Beispiel #20
0
        public void ShowCostTips(long costMoney)
        {
            if (!IsShow)
            {
                return;
            }
            SingleButtonCallBack Tips = CreatObjectToNGUI.InstantiateObj(CostTipsPrefab, BuyBtn.transform).GetComponent <SingleButtonCallBack>();
            Vector3 fromPoint         = new Vector3(0, 50, -30);
            Vector3 toPoint           = new Vector3(0, 0, -30);

            TweenPosition.Begin(Tips.gameObject, 0.5f, fromPoint, toPoint, null);
            TweenAlpha.Begin(Tips.gameObject, 0.5f, 1, 0, DestroyObj);
            Tips.SetButtonBackground(this.SelectGoods.sMsgTradeOpenShopGoodsInfo_SC.bType);
            Tips.SetButtonText(string.Format("-{0}", costMoney));
        }
Beispiel #21
0
        void OnFullHealthBtnClick(object obj)
        {
            int CurrentPay = PlayerManager.Instance.FindHeroDataModel().PlayerValues.PLAYER_FIELD_BINDPAY;

            TraceUtil.Log("玩家当前元宝:" + CurrentPay);
            if (CurrentPay < FullHealthPay)
            {
                GrayButton(FullHealthResurgenceBtn);
                FullHealthResurgenceBtn.SetButtonText(LanguageTextManager.GetString("IDS_H2_44"));//("元宝不足");
            }
            else
            {
                SendFullHealthToSever();
            }
        }
Beispiel #22
0
        void Init(object obj)
        {
            GameDataManager.Instance.dataEvent.RemoveEventHandel(DataType.InitializeEctype, Init);
            SMSGEctypeInitialize_SC sMSGEctypeInitialize_SC = (SMSGEctypeInitialize_SC)GameDataManager.Instance.PeekData(DataType.InitializeEctype);
            EctypeContainerData     ectypeData = EctypeConfigManager.Instance.EctypeContainerConfigList[sMSGEctypeInitialize_SC.dwEctypeContainerId];

            ISTrialsEctype = ectypeData.MapType == 5;
            if (ectypeData.MapType != 5)
            {
                ProgressLabel.gameObject.SetActive(false);
                return;
            }
            ProgressLabel.gameObject.SetActive(true);
            ProgressLabel.SetButtonText("1");
            LoadSceneData loadSceneData = GameDataManager.Instance.PeekData(DataType.LoadingSceneData) as LoadSceneData;
            var           LoadSceneInfo = (SMsgActionNewWorld_SC)loadSceneData.LoadSceneInfo;

            //var TrialsSceneList = EctypeConfigManager.Instance.EctypeContainerConfigFile.ectypeContainerDataList.Where(P => P.MapType == 5).ToArray();
            if (ectypeData.vectMapID.Split('+')[0] == LoadSceneInfo.dwMapId.ToString())
            {
                //IsFrstTrialsEctype = true;
                StartCoroutine(ShowTrialsEctypeIcon(2));
            }
        }
Beispiel #23
0
        IEnumerator ShowAddAtkAnim(int addNumber)
        {
            yield return(null);

            SingleButtonCallBack creatTitle = CreatObjectToNGUI.InstantiateObj(AddAtkNumberTitle, AtkLabel.transform.parent).GetComponent <SingleButtonCallBack>();

            creatTitle.SetButtonText(string.Format("+{0}", addNumber.ToString()));
            Vector3 toPosition   = AtkLabel.transform.localPosition;
            Vector3 fromPosition = toPosition;

            fromPosition += new Vector3(0, 0, -10);
            toPosition   += new Vector3(0, 50, -10);
            TweenPosition.Begin(creatTitle.gameObject, 0.5f, fromPosition, toPosition, DestroyObj);
            TweenAlpha.Begin(creatTitle.gameObject, 0.5f, 1, 0, null);
        }
Beispiel #24
0
        void Updatelabel()
        {
            var    m_HeroDataModel = PlayerManager.Instance.FindHeroDataModel();
            int    money           = m_HeroDataModel.PlayerValues.PLAYER_FIELD_HOLDMONEY;
            int    moneyAbridge    = CommonDefineManager.Instance.CommonDefine.GameMoneyAbridge;
            string newCoppercoin   = money > moneyAbridge?(money / 10000) + "W":money.ToString();
            int    newGoldMoney    = m_HeroDataModel.PlayerValues.PLAYER_FIELD_BINDPAY;
            int    newPractice     = m_HeroDataModel.PlayerValues.PLAYER_FIELD_PRACTICE_NUM;

            GoldMoneyLabel.SetButtonText(newGoldMoney.ToString());
            CopperLabel.SetButtonText(newCoppercoin);
            if (null != PracticeLabel)
            {
                PracticeLabel.SetButtonText(newPractice.ToString());
            }
        }
Beispiel #25
0
        public void Init(SMsgTradeOpenShopGoodsInfo_SC sMsgTradeOpenShopGoodsInfo_SC, ShopGoodsListPanel_V2 MyParent)
        {
            ////TODO GuideBtnManager.Instance.RegGuideButton(this.gameObject, UIType.ShopInfo, SubType.ShopInfoGoodItem, out m_guideBtnID);
            OverlayLabel.SetText("");
            this.MyParent = MyParent;
            this.sMsgTradeOpenShopGoodsInfo_SC = sMsgTradeOpenShopGoodsInfo_SC;
            Effect01.gameObject.SetActive(false);
            Effect02.gameObject.SetActive(false);
            this.LocalGoodsData = ItemDataManager.Instance.GetItemData((int)sMsgTradeOpenShopGoodsInfo_SC.dGoodsID);
            NameLabel.text      = GetGoodsName(LocalGoodsData);
            AllowLvLabel.SetButtonText(LocalGoodsData._AllowLevel.ToString());
            CreatItemIconPoint.ClearChild();
            CreatObjectToNGUI.InstantiateObj(LocalGoodsData._picPrefab, CreatItemIconPoint);
            //var AddString = LocalGoodsData('+');
            //var EfferData = ItemDataManager.Instance.EffectDatas._effects.FirstOrDefault(P => P.m_SzName == AddString[0]);
            switch ((BoxItemType)LocalGoodsData._GoodsClass)
            {
            case BoxItemType.Equipment:
                var AddString = (LocalGoodsData as EquipmentData)._vectEffects.Split('|');
                for (int i = 0; i < AddString.Length; i++)
                {
                    var efferData = ItemDataManager.Instance.EffectDatas._effects.FirstOrDefault(P => P.m_SzName == AddString[i].Split('+')[0]);
                    if (i == 0)
                    {
                        Effect01.gameObject.SetActive(true);
                        Effect01.SetButtonText(HeroAttributeScale.GetScaleAttribute(efferData, int.Parse(AddString[i].Split('+')[1])).ToString());
                        Effect01.SetButtonBackground(efferData.EffectRes);
                    }
                    else if (i == 1)
                    {
                        Effect02.gameObject.SetActive(true);
                        Effect02.SetButtonText(HeroAttributeScale.GetScaleAttribute(efferData, int.Parse(AddString[i].Split('+')[1])).ToString());
                        Effect02.SetButtonBackground(efferData.EffectRes);
                    }
                }
                break;

            case BoxItemType.Materien:
                OverlayLabel.SetText(string.Format("x{0}", LocalGoodsData._PileQty));
                break;

            case BoxItemType.Medicament:
                OverlayLabel.SetText(string.Format("x{0}", LocalGoodsData._PileQty));
                break;
            }
            FlashBackground();
        }
Beispiel #26
0
        void UpdateStatus()
        {
            if (IsLock)
            {
                PackLockCallBack = CreatObjectToNGUI.InstantiateObj(PackLockPrefab, transform).GetComponent <SingleButtonCallBack>();
                PackLockCallBack.transform.localScale    = new Vector3(1.05f, 0.85f, 1);
                PackLockCallBack.transform.localPosition = Vector3.zero;
                PackLockCallBack.SetCallBackFuntion(OnLockBtnClick);
                // 计算解锁的格数
                int UnlockBox = (ContainerInfomanager.Instance.GetContainerClientContsext(2).wMaxSize / 4) - 4;
                int tackGold  = GetActiveEnergyHaveGold(UnlockBox);
                PackLockCallBack.SetButtonText(tackGold.ToString());

                // 引导注入代码
                PackLockCallBack.gameObject.RegisterBtnMappingId(UIType.Package, BtnMapId_Sub.Package_PackUnLock);
            }
            else
            {
                List <ItemFielInfo> allPackItemList = MyParent.MyPackItemList;
                for (int i = MyIndex * 4, iMax = (MyIndex + 1) * 4; i < iMax; i++)
                {
                    //ItemFielInfo currentItemFile = allPackItemList.FirstOrDefault(P=>P.sSyncContainerGoods_SC.nPlace == i);//按后台位置排序
                    ItemFielInfo   currentItemFile = allPackItemList.Count > i? allPackItemList[i]: null;
                    ItemFielInfo   bestItem        = null;
                    EquiptSlotType myItemType      = EquiptSlotType.Null;
                    if (currentItemFile != null)
                    {
                        myItemType = getEquiptType(currentItemFile);
                    }
                    MyParent.BestItemList.TryGetValue(myItemType, out bestItem);
                    bool isBestItem = bestItem != null && bestItem == currentItemFile;
                    SinglePackItemSlot newItemSlot = CreatObjectToNGUI.InstantiateObj(SinglePackItemPrefab, transform).GetComponent <SinglePackItemSlot>();
                    newItemSlot.gameObject.transform.localScale = new  Vector3(0.85f, 0.85f, 1);
                    newItemSlot.transform.localPosition         = new Vector3(-136 + 90 * (i - MyIndex * 4), 0, 0);
                    newItemSlot.Init(currentItemFile, isBestItem, SinglePackItemSlot.ItemStatus.PackItem, MyParent.MyParent.OnItemClick);
                    m_SingleItemList.Add(newItemSlot);

                    //引导注入
                    if (currentItemFile != null)
                    {
                        newItemSlot.gameObject.RegisterBtnMappingId(currentItemFile.LocalItemData._goodID, UIType.Package, BtnMapId_Sub.Package_Cell
                                                                    , m_dragAmountSlerpAct, m_dragAmount);
                    }
                }
            }
        }
Beispiel #27
0
        void InitTreasureChests()
        {
            SMSGEctypeInitialize_SC sMSGEctypeInitialize_SC = (SMSGEctypeInitialize_SC)GameDataManager.Instance.PeekData(DataType.InitializeEctype);
            var ectypeData = EctypeConfigManager.Instance.EctypeContainerConfigList[sMSGEctypeInitialize_SC.dwEctypeContainerId];

            CostIcon.ChangeSprite(ectypeData.ByCostType + 1);
            if (rewardData != null && rewardData.IsHero)
            {
                CostLabel.SetButtonText(ectypeData.ByCost.ToString());
            }
            else
            {
                CostLabel.gameObject.SetActive(false);
            }
            CostMoneyType = ectypeData.ByCostType;
            CostMoney     = ectypeData.ByCost;
            TreasureChestCloseStatusOBj.SetActive(true);
            TreasureChestOpenStatusOBj.SetActive(false);
        }
Beispiel #28
0
        public void Init(int esyContaienrID, int diffContainerID, EctypeContainerListPanel myParent, int pointEctypeID)
        {
            MyParent        = myParent;
            IsLock          = myParent.EctypeIDIsLock(esyContaienrID);
            EsyContainerID  = esyContaienrID;
            DiffContainerID = diffContainerID;
            LockPos.gameObject.SetActive(IsLock);
            LevelLabel.gameObject.SetActive(!IsLock);
            EctypeNameLabel.gameObject.SetActive(!IsLock);
            //EctypeIconPos.gameObject.SetActive(!IsLock);
            StarPos_Esy.gameObject.SetActive(!IsLock);
            StarPos_Diff.gameObject.SetActive(!IsLock);
            EctypeIconPos.ClearChild();
            EctypeContainerIconData ectypeIconData = myParent.EctypeIconData.iconDataList.First(P => P.lEctypeContainerID == EsyContainerID);

            CreatObjectToNGUI.InstantiateObj(ectypeIconData.EctypeIconPrefab, EctypeIconPos);
            if (IsLock)
            {
                return;
            }

            StarPos_Esy.ClearChild();
            StarPos_Diff.ClearChild();
            CreatObjectToNGUI.InstantiateObj(GetStarPrefab(esyContaienrID), StarPos_Esy);
            CreatObjectToNGUI.InstantiateObj(GetStarPrefab(diffContainerID), StarPos_Diff);
            var ectypeContainerData = EctypeConfigManager.Instance.EctypeContainerConfigList[esyContaienrID];

            EctypeNameLabel.SetButtonText(LanguageTextManager.GetString(ectypeContainerData.lEctypeName));
            LevelLabel.SetButtonText(ectypeContainerData.lMinActorLevel.ToString());
            //if(isPointEctype || (!isPointEctype && (myParent.isMaxEctypeContaienrID(esyContaienrID)||myParent.isMaxEctypeContaienrID(diffContainerID))) )
            if (pointEctypeID != -1 && (pointEctypeID == esyContaienrID || pointEctypeID == diffContainerID))
            {
                OnClickEvent(false);
            }
            else if (pointEctypeID == -1 && (myParent.isMaxEctypeContaienrID(esyContaienrID) || myParent.isMaxEctypeContaienrID(diffContainerID)))
            {
                OnClickEvent(false);
            }
            mobaMark.SetActive(ectypeContainerData.IsMOBA == 0?false:true);
            #region `    引导注入代码
            gameObject.RegisterBtnMappingId(esyContaienrID, UIType.Battle, BtnMapId_Sub.Battle_EctypeChoice);
            #endregion
        }
Beispiel #29
0
    void ReceiveUpdateRoomSeatInfoHandle(INotifyArgs arg)
    {
        var roomSeatInfo = PlayerRoomManager.Instance.GetRoomSeatInfo();

        if (roomSeatInfo.dwPlayerNum == 0)
        {
            return;
        }
        m_RoomMemberNum = (int)roomSeatInfo.dwPlayerNum;
        var playerData = PlayerManager.Instance.FindHeroDataModel();

        if (playerData.ActorID == 0 || !GameManager.Instance.CreateEntityIM)
        {
            StartCoroutine(LateUpdateRoomSeatInfo());
            return;
        }
        m_IsHomer = playerData.ActorID == roomSeatInfo.dwHomerActorID;

        Label_RoomID.text     = "(" + roomSeatInfo.dwRoomID.ToString() + ")";
        Label_PlayerNum.text  = m_RoomMemberNum.ToString() + "/6";
        Label_Homeowners.text = string.Format(LanguageTextManager.GetString("IDS_H1_474"), roomSeatInfo.HomerName);
        if (m_HomerAccountConfigData == null)
        {
            //TraceUtil.Log("[RoomType]" + roomSeatInfo.byRoomType);
            m_HomerAccountConfigData = PlayerRoomAccoutConfigDataBase._dataTable.SingleOrDefault(p => p._roomTypeID == roomSeatInfo.byRoomType);
            UpdatePracticeInfo();
        }
        //妖女展示按钮
        Button_ShowSirenl.gameObject.SetActive(m_IsHomer);
        Image_ShowSiren.SetActive(m_IsHomer);
        //设置玩家站位和角度
        SetPlayersPosAndAngle();
        //设置摄像头
        SetCamera();
        //突破信息
        Button_Break.SetButtonText(CountBreakResult(4 * 60).ToString());
        //离开信息
        Button_Exit.SetButtonText(CountPracticeResult(12 * 60).ToString());
    }
Beispiel #30
0
        /// <summary>
        /// 显示面板各项属性
        /// </summary>
        void SetPanelAttribute()
        {
            //int StrengLevel = itemFielInfo.equipmentEntity.EQUIP_FIELD_STRONGE_LEVEL;
            StrengthLabel.gameObject.SetActive(true);
            StrengthLabel.SetButtonText(itemFielInfo.LocalItemData._AllowLevel.ToString());
            string ItemName = LanguageTextManager.GetString(this.itemFielInfo.LocalItemData._szGoodsName);

            this.NameLabel.SetText(NGUIColor.SetTxtColor(ItemName, GetNameLabelColor(itemFielInfo)));

            CreatObjectToNGUI.InstantiateObj(this.itemFielInfo.LocalItemData._picPrefab, CreatItemIconPoint);
            switch ((BoxItemType)itemFielInfo.LocalItemData._GoodsClass)
            {
            case BoxItemType.Equipment:
                if (itemFielInfo.equipmentEntity.EQUIP_FIELD_EFFECTBASE0 != 0)    //主属性1
                {
                    ContainerEffect01.gameObject.SetActive(true);
                    ContainerEffect01.ShowEffect(itemFielInfo, 0);
                }
                if (itemFielInfo.equipmentEntity.EQUIP_FIELD_EFFECTBASE1 != 0)    //主属性2
                {
                    ContainerEffect02.gameObject.SetActive(true);
                    ContainerEffect02.ShowEffect(itemFielInfo, 1);
                }
                int StrengLevel = itemFielInfo.equipmentEntity.EQUIP_FIELD_STRONGE_LEVEL;
                this.NameLabel.SetText(NGUIColor.SetTxtColor(StrengLevel > 0?string.Format("{0}+{1}", ItemName, StrengLevel):ItemName, GetNameLabelColor(itemFielInfo)));
                break;

            case BoxItemType.Medicament:
                OverlayLabel.SetText(string.Format("x{0}", itemFielInfo.sSyncContainerGoods_SC.byNum));
                break;

            case BoxItemType.Materien:
                OverlayLabel.SetText(string.Format("x{0}", itemFielInfo.sSyncContainerGoods_SC.byNum));
                break;
            }
        }