コード例 #1
0
        private void SetFilledState()
        {
            Data.eRoleAttr type  = Data.char_type;
            PartnerGrade   grade = (PartnerGrade)Data.role_grade;
            int            star  = 3;

            TextureCamp.spriteName = Data.skin;
            AttrSprite.spriteName  = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[type];
            HotfixCreateFX.ShowCharTypeFX(charFx, efClip, AttrSprite.transform, grade, type);
            GradeSprite.spriteName = LTPartnerConfig.PARTNER_GRADE_SPRITE_NAME_DIC[grade];

            for (int i = 0; i < StarGrid.transform.childCount; i++)
            {
                StarGrid.transform.GetChild(i).gameObject.CustomSetActive(i < star);
            }
            StarGrid.repositionNow = true;
        }
コード例 #2
0
        IEnumerator ProgressChange(float f, Data.eRoleAttr attr = Data.eRoleAttr.None)
        {
            while (!SceneLogicManager.isMainlands()) //等到主城中
            {
                yield return(null);
            }

            int buffIndex = -1;

            if (_progress != null)
            {
                if (f > 0.67)
                {
                    _progress.value = 0.67f;
                }
                else if (f > 0.34)
                {
                    _progress.value = 0.34f;
                }
            }

            float pv = _progress != null ? _progress.value : 0f;

            while (pv != f)
            {
                if (pv > f)
                {
                    pv -= 0.004f;

                    if (pv < f)
                    {
                        pv = f;
                    }
                }
                else if (pv < f)
                {
                    pv += 0.004f;

                    if (pv > f)
                    {
                        pv = f;
                    }
                }

                if (_progress != null)
                {
                    _progress.value = pv;
                }

                int index = 0;

                if (pv > 0.67)
                {
                    index = 2;
                }
                else if (pv > 0.34)
                {
                    index = 1;
                }
                else if (pv > 0)
                {
                    index = 0;
                }

                if (buffIndex != index)
                {
                    buffIndex = index;

                    if (_items != null)
                    {
                        for (int i = 0; i < _items.Length; i++)
                        {
                            if (i > index)
                            {
                                _items[i].wenSpt.gameObject.SetActive(true);
                                _items[i].attributeIcon.gameObject.SetActive(false);
                                SetFxObjAction(_items[i]);
                            }
                            else
                            {
                                _items[i].wenSpt.gameObject.SetActive(false);
                                _items[i].attributeIcon.gameObject.SetActive(true);
                                SetFxObjAction(_items[i], attr);
                            }
                        }
                    }
                }

                yield return(null);
            }

            if (pv > 0.99f)
            {
                if (_boxFx != null)
                {
                    _boxFx.enabled = true;
                }

                yield return(OpenAward());
            }
        }
コード例 #3
0
 public void SetCharTypeFx(PartnerGrade partnerGrade, Data.eRoleAttr attr)
 {
     HotfixCreateFX.ShowCharTypeFX(charFx, efClip, AttrBGSprite.transform, partnerGrade, attr);
 }