Beispiel #1
0
        void Awake()
        {
            BsetItem           = CreatObjectToNGUI.InstantiateObj(BesetItem_prafab, Item_point).GetComponent <JewelBset_ContainerItem>();
            BsetItem.CanCancel = true;
            buttonCallBack.SetCallBackFuntion(obj => {
                SoundManager.Instance.PlaySoundEffect("Sound_Button_Stone_Click");
                if (fielInfo != null)
                {
                    EquiptSlotType place       = (EquiptSlotType)int.Parse((fielInfo.LocalItemData as EquipmentData)._vectEquipLoc);
                    List <JewelInfo> jewelInfo = PlayerDataManager.Instance.GetJewelInfo(place);
                    if (_holeIndex == HoleIndex.FirstHole)
                    {
                        if (jewelInfo[0].JewelID != 0)
                        {
                            if (ContainerInfomanager.Instance.PackIsFull())
                            {
                                MessageBox.Instance.ShowTips(3, LanguageTextManager.GetString("IDS_I9_20"), 1);
                            }
                            else
                            {
                                NetServiceManager.Instance.EquipStrengthenService.SendRequestGoodsOperateRemoveCommand(fielInfo.sSyncContainerGoods_SC.uidGoods, 1);
                            }

                            //JewelBesetManager.GetInstance().ShowRemoveJewel1Effect();
                            //JewelBesetManager.GetInstance().RemoveQueue.Enqueue(1);
                        }
                        else
                        {
                            //Debug.Log(place);
                            JewelBesetManager.GetInstance().UpdateChoseJewelList_Beset(fielInfo, 1);
                            JewelBesetManager.GetInstance().ChangeSubUistate(JewelState.JewelChose_Beset);
                        }
                    }
                    else
                    {
                        if (jewelInfo[1].JewelID != 0)
                        {
                            if (ContainerInfomanager.Instance.PackIsFull())
                            {
                                MessageBox.Instance.ShowTips(3, LanguageTextManager.GetString("IDS_I9_20"), 1);
                            }
                            else
                            {
                                NetServiceManager.Instance.EquipStrengthenService.SendRequestGoodsOperateRemoveCommand(fielInfo.sSyncContainerGoods_SC.uidGoods, 2);
                            }

                            //JewelBesetManager.GetInstance().ShowRemoveJewel2Effect();
                            //JewelBesetManager.GetInstance().RemoveQueue.Enqueue(2);
                        }
                        else
                        {
                            JewelBesetManager.GetInstance().UpdateChoseJewelList_Beset(fielInfo, 2);
                            JewelBesetManager.GetInstance().ChangeSubUistate(JewelState.JewelChose_Beset);
                        }
                    }
                    JewelBesetManager.GetInstance().DisableAllHoleButton();
                }
            });
            buttonCallBack.SetPressCallBack(OnButtonPress);
        }
Beispiel #2
0
        IEnumerator  ShowBesetEff(JewelBset_ContainerItem SelectedStone)
        {
            Vector3 Pos;

            Pos = JewelBesetManager.GetInstance().GetUpdagradeHolePos();
            SoundManager.Instance.PlaySoundEffect("Sound_UIEff_Stone_Upgrade");
            yield return(StartCoroutine(SelectedStone.ShowSwallowEff(Pos)));
        }
Beispiel #3
0
        public IEnumerator ShowRemoveJewelEffect2()
        {
            RemoveJewelEffect2.SetActive(true);
            yield return(new WaitForSeconds(2.5f));

            RemoveJewelEffect2.SetActive(false);
            JewelBesetManager.GetInstance().ChangeSubUistate(JewelState.JewelBeset);
            JewelBesetManager.GetInstance().UPdateContain(JewelState.JewelBeset, CurrentItemfielInfo);
        }
Beispiel #4
0
        IEnumerator HideChosePanel()
        {
            yield return(new WaitForSeconds(1));

            JewelBesetManager.GetInstance().ChangeSubUistate(JewelState.JewelBeset);
            yield return(new WaitForSeconds(1f));

            JewelBesetManager.GetInstance().UpdateBesetPanel(CurrentItemFileInfo);
        }
Beispiel #5
0
        IEnumerator  ChangTab()
        {
            yield return(null);

            JewelBesetManager.GetInstance().ChangeSubUistate(JewelState.JewelUpgrad);
            JewelBesetManager.GetInstance().UPdateContain(JewelState.jewelChose_Upgrade, _itemfileinfo);
            JewelBesetManager.GetInstance().InitBeset_Attribute(null, null);
            //yield return StartCoroutine(SelectedStone.ShowBesetEff(Pos));
        }
Beispiel #6
0
        void OnItemClick(JewelBset_ContainerItem selectedEquipItem)
        {
            if (selectedEquipItem != null && selectedEquipItem.ItemFielInfo != null)
            {
                JewelBesetManager.GetInstance().InitBeset_Attribute(selectedEquipItem.ItemFielInfo, selectedEquipItem);

                selectedEquipItem.OnGetFocus(false);
            }
        }
Beispiel #7
0
 public override void ItemSelectedEventHandle(JewelBset_ContainerItem selectedEquipItem)
 {
     base.ItemSelectedEventHandle(selectedEquipItem);
     StoneID       = selectedEquipItem.ItemFielInfo.sSyncContainerGoods_SC.uidGoods;
     SelectedStone = selectedEquipItem;
     if (selectedEquipItem != null && selectedEquipItem.ItemFielInfo != null)
     {
         JewelBesetManager.GetInstance().InitBeset_Attribute(selectedEquipItem.ItemFielInfo, selectedEquipItem);
     }
 }
Beispiel #8
0
 public static JewelBesetManager GetInstance()
 {
     if (!instance)
     {
         instance = (JewelBesetManager)GameObject.FindObjectOfType(typeof(JewelBesetManager));
         if (!instance)
         {
             Debug.LogError("没有附加JewelBesetManager脚本的gameobject在场景中");
         }
     }
     return(instance);
 }
Beispiel #9
0
        IEnumerator  ShowBesetEff()
        {
            Vector3 Pos;

            if (place == 1)
            {
                Pos = JewelBesetManager.GetInstance().GetFirsHolePos();
            }
            else
            {
                Pos = JewelBesetManager.GetInstance().GetSecondHolePos();
            }
            yield return(StartCoroutine(SelectedStone.ShowBesetEff(Pos)));
        }
Beispiel #10
0
        public IEnumerator ShowSwallowEff(Vector3 Targetpos)
        {
            SwallowEff1.SetActive(true);
            swallowTween.PossionTweenUseWorldPos = true;
            Vector3 from = new Vector3(Eff_point.position.x, Eff_point.position.y, Eff_point.position.z);
            Vector3 to   = new Vector3(Targetpos.x, Targetpos.y, Targetpos.z);

            TweenPosition.Begin(SwallowEff1, 1.5f, from, to);
            yield return(new WaitForSeconds(1.75f));

            swallowTween.PossionTweenUseWorldPos = false;
            BesetEff1.SetActive(false);
            StartCoroutine(JewelBesetManager.GetInstance().ShowSwallowSuccseeEff());
        }
Beispiel #11
0
        public IEnumerator ShowBesetEff(Vector3 Targetpos)
        {
            BesetEff1.SetActive(true);
            BesetEff1.transform.localPosition = Vector3.zero;
            yield return(new WaitForSeconds(1.0f));

            Besettween.PossionTweenUseWorldPos = true;
            TweenPosition.Begin(BesetEff1, 1f, Eff_point.position, Targetpos);
            yield return(new WaitForSeconds(1));

            Besettween.PossionTweenUseWorldPos = false;
            yield return(new WaitForSeconds(0.85f));

            BesetEff1.SetActive(false);
            StartCoroutine(JewelBesetManager.GetInstance().ShowBesetSuccseeEff());
        }
Beispiel #12
0
 public void UpdateContain(JewelState tab, ItemFielInfo itemfileInfo)
 {
     if (tab == JewelState.JewelBeset)
     {
         ChangeStrenType(true);
     }
     else
     {
         ChangeStrenType(false);
     }
     JewelBesetManager.GetInstance().InitContianerTab(tab);
     JewelBesetManager.GetInstance().UpdateBesetPanel(null);
     //StartCoroutine( RefreshList(tab));
     InitItemList(tab);
     SelectItem(itemfileInfo);
 }
Beispiel #13
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);
            }
        }
Beispiel #14
0
        public void Init(ItemFielInfo selectedEquipItem, HoleIndex holeIndex)
        {
            _holeIndex    = holeIndex;
            this.fielInfo = selectedEquipItem;
            ItemFielInfo JewelitemfileInfo;

            if (fielInfo != null)
            {
                BsetItem.OnItemClick = OnItemClick;
                JewelBesetManager.GetInstance().EnableAllHoleButton();
                List <JewelInfo> jewelInfo = PlayerDataManager.Instance.GetJewelInfo((EquiptSlotType)fielInfo.sSyncContainerGoods_SC.nPlace);
                if (holeIndex == HoleIndex.FirstHole)
                {
                    if (fielInfo != null && jewelInfo[0].JewelID != 0)
                    {
                        JewelitemfileInfo = new ItemFielInfo(jewelInfo[0].JewelID);
                        BsetItem.InitItemData(JewelitemfileInfo);
                        buttonCallBack.spriteSwithList.ApplyAllItem(p => p.ChangeSprite(3));
                    }
                    else
                    {
                        BsetItem.InitItemData(null);
                        buttonCallBack.spriteSwithList.ApplyAllItem(p => p.ChangeSprite(1));
                    }
                }
                else
                {
                    if (fielInfo != null && jewelInfo[1].JewelID != 0)
                    {
                        JewelitemfileInfo = new ItemFielInfo(jewelInfo[1].JewelID);
                        BsetItem.InitItemData(JewelitemfileInfo);
                        buttonCallBack.spriteSwithList.ApplyAllItem(p => p.ChangeSprite(3));
                    }
                    else
                    {
                        BsetItem.InitItemData(null);
                        buttonCallBack.spriteSwithList.ApplyAllItem(p => p.ChangeSprite(1));
                    }
                }
            }
            else
            {
                BsetItem.InitItemData(null);
                SetButtonDisable();
            }
        }
Beispiel #15
0
        //private List<ItemFielInfo> SelectedItemFileInfoList=new List<ItemFielInfo>();
        void Awake()
        {
            Button_back.SetCallBackFuntion(c =>
            {
                SoundManager.Instance.PlaySoundEffect("Sound_Button_Stone_Click");
                JewelBesetManager.GetInstance().ChangeSubUistate(JewelState.JewelUpgrad);
                SelectedItemList.Clear();
            });
            Button_Beset.SetCallBackFuntion(c =>
            {
                SoundManager.Instance.PlaySoundEffect("Sound_Button_Stone_Click");
                JewelBesetManager.GetInstance().UpdateChodeJewelList_swallow_ensure(_itemFielInfo, SelectedItemList);
                JewelBesetManager.GetInstance().ChangeSubUistate(JewelState.JewelChose_Upgrade_ensure);
            });

            TaskGuideBtnRegister();
        }
Beispiel #16
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();
 }
Beispiel #17
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);
        }
Beispiel #18
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();
        }
Beispiel #19
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();
 }
Beispiel #20
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();
        }
Beispiel #21
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;
        }