コード例 #1
0
//		public IEnumerator ShowSwallow2()
//		{
//			SwallowEff2.SetActive(true);
//			yield return new WaitForSeconds(1);
//			SwallowEff2.SetActive(false);
//		}
        public void  Init(ItemFielInfo itemFileInfo)
        {
            if (itemFileInfo != null)
            {
                HideOrShow(true);
                Jewel jewel = ItemDataManager.Instance.GetItemData(itemFileInfo.LocalItemData._goodID) as Jewel;
                JewelName.SetText(NGUIColor.SetTxtColor(LanguageTextManager.GetString(itemFileInfo.LocalItemData._szGoodsName), (TextColor)itemFileInfo.LocalItemData._ColorLevel));
                JewelPosition.SetText(ItemInfoTips_Jewel.getJewelPosion(jewel.StonePosition, "、"));
                JewelLevel.SetText(itemFileInfo.materiel.ESTORE_FIELD_LEVEL);
                IconPoint.ClearChild();
                CreatObjectToNGUI.InstantiateObj(jewel._picPrefab, IconPoint);
                if (itemFileInfo.materiel.ESTORE_FIELD_LEVEL < jewel.MaxLevel)
                {
                    Progress_text.gameObject.SetActive(true);
                    FullLevel.SetActive(false);

                    Progress_text.SetText(itemFileInfo.materiel.ESTORE_FIELD_EXP + "/" + jewel.StoneExp[itemFileInfo.materiel.ESTORE_FIELD_LEVEL - 1]);
                    Progress_slider.sliderValue = (float)itemFileInfo.materiel.ESTORE_FIELD_EXP / (float)jewel.StoneExp[itemFileInfo.materiel.ESTORE_FIELD_LEVEL - 1];
                }
                else
                {
                    Progress_text.gameObject.SetActive(false);
                    Progress_slider.sliderValue = 1;
                    FullLevel.SetActive(true);
                }
                //服务器bug器魂初始等级为0为了调试这里+1
                currentskill = JewelBesetManager.GetInstance().passiveSkillDataBase._dataTable.First(c => c.SkillID == jewel.PassiveSkill && c.SkillLevel == itemFileInfo.materiel.ESTORE_FIELD_LEVEL);
                CurrentAtt.Init(currentskill);
                if (itemFileInfo.materiel.ESTORE_FIELD_LEVEL < jewel.MaxLevel)
                {
                    NextrAtt.gameObject.SetActive(true);
                    nextSkill = JewelBesetManager.GetInstance().passiveSkillDataBase._dataTable.First(c => c.SkillID == jewel.PassiveSkill && c.SkillLevel == (itemFileInfo.materiel.ESTORE_FIELD_LEVEL + 1));
                    NextrAtt.Init(nextSkill);
                    NoneAtt.gameObject.SetActive(false);
                }
                else
                {
                    NextrAtt.gameObject.SetActive(false);
                    NoneAtt.gameObject.SetActive(true);
                }
            }
            else
            {
                HideOrShow(false);
            }
        }
コード例 #2
0
 void Awake()
 {
     RegisterEventHandler();
     Button_back.SetCallBackFuntion(c => {
         SoundManager.Instance.PlaySoundEffect("Sound_Button_Stone_Cancel");
         JewelBesetManager.GetInstance().ChangeSubUistate(JewelState.JewelBeset);
         JewelBesetManager.GetInstance().UPdateContain(JewelState.JewelBeset, CurrentItemFileInfo);
         JewelBesetManager.GetInstance().InitBeset_Attribute(null, null);
     });
     Button_Beset.SetCallBackFuntion(c => {
         SoundManager.Instance.PlaySoundEffect("Sound_Button_Stone_Confirm");
         Button_Beset.SetMyButtonActive(false);
         byte p = System.Convert.ToByte(place);
         NetServiceManager.Instance.EquipStrengthenService.SendRequestGoodsOperateBesetCommmand(EquipID, StoneID, p);
         //JewelBesetManager.GetInstance().besetQueue.Enqueue(place);
     });
     TaskGuideBtnRegister();
 }
コード例 #3
0
        /// <summary>
        /// Init the specified jewel and SkillLevel.
        /// </summary>
        /// <param name="jewel">Jewel.</param>
        /// <param name="SkillLevel">Skill level.</param>
        public void Init(ItemFielInfo itemFielInfo, bool isSuit)
        {
            ItemId = itemFielInfo.LocalItemData._goodID;
            jewel  = ItemDataManager.Instance.GetItemData(ItemId) as Jewel;

            if (isSuit)
            {
                Title.SetText("套装属性");
                skillId    = jewel._activePassiveSkill.skillID;
                skillLevel = jewel._activePassiveSkill.skillLevel;
            }
            else
            {
                Title.SetText("器魂属性");

                skillId = jewel.PassiveSkill;
                if (itemFielInfo.sSyncContainerGoods_SC.uidGoods != 0)
                {
                    skillLevel = itemFielInfo.materiel.ESTORE_FIELD_LEVEL;
                }
                else
                {
                    EquiptSlotType   type       = (EquiptSlotType)JewelBesetManager.GetInstance().Sc_Container.SelectItemFileInfo.sSyncContainerGoods_SC.nPlace;
                    List <JewelInfo> jewelInfos = PlayerDataManager.Instance.GetJewelInfo(type);
                    foreach (var item in jewelInfos)
                    {
                        if (item.JewelID == jewel._goodID)
                        {
                            skillLevel = item.JewelLevel;
                        }
                    }
                }
            }
            SkillLevel.SetText(string.Format(LanguageTextManager.GetString("IDS_I9_29"), skillLevel));
            if (skillLevel == 0)
            {
                skillLevel++;
            }
            passiveSkillData = _PassiveSkillDataBase._dataTable.First(c => (c.SkillID == skillId && c.SkillLevel == skillLevel));
            SkillName.SetText(LanguageTextManager.GetString(passiveSkillData.SkillName));
            AttributeContent.Init(passiveSkillData);
        }
コード例 #4
0
 void Awake()
 {
     TipsLable.SetText(LanguageTextManager.GetString("IDS_I9_28"));
     RegisterEventHandler();
     Button_back.SetCallBackFuntion(c =>
     {
         SoundManager.Instance.PlaySoundEffect("Sound_Button_Stone_Click");
         JewelBesetManager.GetInstance().ChangeSubUistate(JewelState.jewelChose_Upgrade);
     });
     Button_Beset.SetCallBackFuntion(c =>
     {
         SoundManager.Instance.PlaySoundEffect("Sound_Button_Stone_Click");
         if (IDs.Length > 0)
         {
             byte length = System.Convert.ToByte(IDs.Length);
             NetServiceManager.Instance.EquipStrengthenService.SendRequestGoodsOperateSwallowCommand(_itemfileinfo.sSyncContainerGoods_SC.uidGoods, length, IDs);
             Button_Beset.SetMyButtonActive(false);
         }
     });
     TaskGuideBtnRegister();
 }
コード例 #5
0
        public void OnBesetButtonClick(object obj)
        {
            SoundManager.Instance.PlaySoundEffect("Sound_Button_Equipment_Switch");
            ChangeStrenType(true);
            JewelBesetManager.GetInstance().ChangeSubUistate(JewelState.JewelBeset);
            JewelBesetManager.GetInstance().InitRightTipsButton(JewelState.JewelBeset);
            JewelBesetManager.GetInstance().UpdateBesetPanel(null);
            JewelBesetManager.GetInstance().InitBeset_Attribute(null, null);
            ItemFielInfo defultSelectItem = obj as ItemFielInfo;

            //var item= ItemList.Where(c=>c.ItemFielInfo==defultSelectItem).FirstOrDefault();
            if (defultSelectItem != null)
            {
                UpdateContain(JewelState.JewelBeset, defultSelectItem);
            }
            else
            {
                InitItemList(JewelState.JewelBeset);
            }
            JewelBesetManager.GetInstance().HideEff();
        }
コード例 #6
0
        public void OnUpgradeButtonClick(object obj)
        {
            SoundManager.Instance.PlaySoundEffect("Sound_Button_Equipment_Switch");
            ChangeStrenType(false);
            JewelBesetManager.GetInstance().ChangeSubUistate(JewelState.JewelUpgrad);
            JewelBesetManager.GetInstance().InitRightTipsButton(JewelState.JewelUpgrad);
            JewelBesetManager.GetInstance().UpdateUpgradePanel(null);
            //StartCoroutine(RefreshList(JewelState.JewelUpgrad));

            ItemFielInfo defultSelectItem = obj as ItemFielInfo;

            //var item= ItemList.Where(c=>c.ItemFielInfo==defultSelectItem).FirstOrDefault();
            if (defultSelectItem != null)
            {
                UpdateContain(JewelState.JewelUpgrad, defultSelectItem);
            }
            else
            {
                InitItemList(JewelState.JewelUpgrad);
            }
            JewelBesetManager.GetInstance().HideEff();
        }
コード例 #7
0
        /// <summary>
        /// 装备项选择处理
        /// </summary>
        /// <param name="selectedEquipItem">Selected equip item.</param>
        public override void  ItemSelectedEventHandle(JewelBset_ContainerItem selectedEquipItem)
        {
            base.ItemSelectedEventHandle(selectedEquipItem);
            SelectItemFileInfo = selectedEquipItem.ItemFielInfo;
            if (selectedEquipItem.ItemFielInfo.severItemFielType == SeverItemFielInfoType.Equid)
            {
                JewelBesetManager.GetInstance().UpdateBesetPanel(selectedEquipItem.ItemFielInfo);
            }
            else
            {
                //JewelBesetManager.GetInstance().SelectedJewel=selectedEquipItem.ItemFielInfo;
                JewelBesetManager.GetInstance().UpdateUpgradePanel(selectedEquipItem.ItemFielInfo);
            }

            if (selectedEquipItem != null && selectedEquipItem.ItemFielInfo != null)
            {
                JewelBesetManager.GetInstance().InitBeset_Attribute(selectedEquipItem.ItemFielInfo, selectedEquipItem);
            }
            //调用EquipDetails的方法刷新当前选择装备的详细信息
//			CurrrEquipDetails.Init(selectedEquipItem.ItemFielInfo,IsNormalStren);
//			m_selectedItemInfo=selectedEquipItem.ItemFielInfo;
        }