| | |
| | | using System;
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class MethodToWin : Window ,SecondWindowInterface
|
| | | public class MethodToWin : Window, SecondWindowInterface
|
| | | {
|
| | | //心法
|
| | | [SerializeField] ScrollerController m_ScrollerController;
|
| | |
| | | Dictionary<int, string> _dicFamilyIcon;//心法Icon
|
| | | Dictionary<int, string> _dicFamilyName;//心法名
|
| | |
|
| | | private AchievementGuideEffect AchievementGuideEffect1;
|
| | | private AchievementGuideEffect AchievementGuideEffect1;
|
| | | enum BasicAttribute
|
| | | {
|
| | | BasicsAttack = 1,//基础攻击
|
| | |
| | | }
|
| | | public void Basic_Attribute(int id)
|
| | | {
|
| | | var config = FamilyTechConfig.Get(id * 1000 + 1);
|
| | | if (config == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var propertyConfig = PlayerPropertyConfig.Get(config.attrType);
|
| | | switch ((BasicAttribute)id)
|
| | | {
|
| | | case BasicAttribute.BasicsAttack:
|
| | | m_PrimaryAttribute.text = string.Format(Language.Get("MethodTo_C"), PlayerDatas.Instance.baseData.BasicsMaxAttack);
|
| | | m_PrimaryAttribute.text = Language.Get("MethodTo_C", propertyConfig.ISPercentage == 0 ? UIHelper.GetPropertyValue((PropertyType)config.attrType)
|
| | | : PlayerDatas.Instance.baseData.BasicsMaxAttack);
|
| | | break;
|
| | | case BasicAttribute.BasicsLife:
|
| | | m_PrimaryAttribute.text = string.Format(Language.Get("MethodTo_D"), PlayerDatas.Instance.baseData.BasicsLife);
|
| | | m_PrimaryAttribute.text = Language.Get("MethodTo_D", propertyConfig.ISPercentage == 0 ? UIHelper.GetPropertyValue((PropertyType)config.attrType) :
|
| | | PlayerDatas.Instance.baseData.BasicsLife);
|
| | | break;
|
| | | case BasicAttribute.BasicsDefense:
|
| | | m_PrimaryAttribute.text = string.Format(Language.Get("MethodTo_E"), PlayerDatas.Instance.baseData.BasicsDefense);
|
| | | m_PrimaryAttribute.text = Language.Get("MethodTo_E", propertyConfig.ISPercentage == 0 ? UIHelper.GetPropertyValue((PropertyType)config.attrType) :
|
| | | PlayerDatas.Instance.baseData.BasicsDefense);
|
| | | break;
|
| | | case BasicAttribute.BasicsScoreAHit:
|
| | | m_PrimaryAttribute.text = string.Format(Language.Get("MethodTo_F"), PlayerDatas.Instance.baseData.BasicsScoreAHit);
|
| | | m_PrimaryAttribute.text = Language.Get("MethodTo_F", propertyConfig.ISPercentage == 0 ? UIHelper.GetPropertyValue((PropertyType)config.attrType) :
|
| | | PlayerDatas.Instance.baseData.BasicsScoreAHit);
|
| | | break;
|
| | | case BasicAttribute.BasicsDodge:
|
| | | m_PrimaryAttribute.text = string.Format(Language.Get("MethodTo_G"), PlayerDatas.Instance.baseData.BasicsDodge);
|
| | | m_PrimaryAttribute.text = Language.Get("MethodTo_G", propertyConfig.ISPercentage == 0 ? UIHelper.GetPropertyValue((PropertyType)config.attrType) :
|
| | | PlayerDatas.Instance.baseData.BasicsDodge);
|
| | | break;
|
| | | case BasicAttribute.Hurt:
|
| | | m_PrimaryAttribute.text = string.Format(Language.Get("MethodTo_H"), PlayerDatas.Instance.extersion.realATK);
|
| | | m_PrimaryAttribute.text = Language.Get("MethodTo_H", propertyConfig.ISPercentage == 0 ? UIHelper.GetPropertyValue((PropertyType)config.attrType) :
|
| | | PlayerDatas.Instance.extersion.realATK);
|
| | | break;
|
| | | case BasicAttribute.Resistance:
|
| | | m_PrimaryAttribute.text = string.Format(Language.Get("MethodTo_I"), PlayerDatas.Instance.extersion.realDEF);
|
| | | m_PrimaryAttribute.text = Language.Get("MethodTo_I", propertyConfig.ISPercentage == 0 ? UIHelper.GetPropertyValue((PropertyType)config.attrType) :
|
| | | PlayerDatas.Instance.extersion.realDEF);
|
| | | break;
|
| | |
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | m_ScrollerController.m_Scorller.RefreshActiveCellViews();
|
| | | break;
|
| | | default:
|
| | | if (indexID != -1)
|
| | | {
|
| | | Basic_Attribute(indexID);
|
| | | }
|
| | | break;
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | foreach (int key in method._DicSkill.Keys)
|
| | | {
|
| | | if (method.MethodRedPointBtnDic.ContainsKey(key))
|
| | | { |
| | | {
|
| | | if (method.MethodRedPointBtnDic[key].state == RedPointState.Simple)
|
| | | {
|
| | | indexID = key;
|
| | |
| | | {
|
| | | _SkillLevelText.text = _dicFamilyName[id] + method._DicSkill[id].SkillLV.ToString() + Language.Get("Z1041");
|
| | | var configFamilyNow = FamilyTechConfig.Get(method._DicSkill[id].SkillID);
|
| | | var propertyConfig = PlayerPropertyConfig.Get(configFamilyNow.attrType);
|
| | | if (configFamilyTech != null)
|
| | | {
|
| | | _attrValue = configFamilyTech.attrType;
|
| | | m_LowerCurrentAttribute.text = string.Format(Language.Get("MethodTo_A"), PlayerPropertyConfig.Get(_attrValue.ToString()).Name, UIHelper.ReplacePercentage(configFamilyNow.attrValue, 1));
|
| | | m_LowerCurrentAttribute.text = string.Format(Language.Get("MethodTo_A"),
|
| | | propertyConfig.Name, UIHelper.ReplacePercentage(configFamilyNow.attrValue, propertyConfig.ISPercentage) +
|
| | | (propertyConfig.ISPercentage == 1 ? "%" : string.Empty));
|
| | | }
|
| | | else
|
| | | {
|
| | | var configFamilyTechMax = FamilyTechConfig.Get(method._DicSkill[id].SkillID);
|
| | | int _attrValueMax = configFamilyTechMax.attrType;
|
| | | m_LowerCurrentAttribute.text = string.Format(Language.Get("MethodTo_A"), PlayerPropertyConfig.Get(_attrValueMax.ToString()).Name, UIHelper.ReplacePercentage(configFamilyNow.attrValue, 1));
|
| | | m_LowerCurrentAttribute.text = string.Format(Language.Get("MethodTo_A"),
|
| | | propertyConfig.Name, UIHelper.ReplacePercentage(configFamilyNow.attrValue, propertyConfig.ISPercentage) +
|
| | | (propertyConfig.ISPercentage == 1 ? "%" : string.Empty));
|
| | | }
|
| | | if (configFamilyTech != null)
|
| | | {
|
| | |
|
| | | m_Properties.text = string.Format(Language.Get("MethodTo_B"), PlayerPropertyConfig.Get(_attrValue.ToString()).Name, UIHelper.ReplacePercentage(configFamilyTech.attrValue, 1));
|
| | |
|
| | | m_Properties.text = string.Format(Language.Get("MethodTo_B"),
|
| | | propertyConfig.Name, UIHelper.ReplacePercentage(configFamilyTech.attrValue, propertyConfig.ISPercentage) +
|
| | | (propertyConfig.ISPercentage == 1 ? "%" : string.Empty));
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | else
|
| | | {
|
| | | _SkillLevelText.text = _dicFamilyName[id] + (method._DicSkill[id].SkillLV + 1).ToString() + Language.Get("Z1041");
|
| | | int _attrValue1 = configFamilyTechOne.attrType;
|
| | | m_LowerCurrentAttribute.text = string.Format(Language.Get("MethodTo_A"), PlayerPropertyConfig.Get(_attrValue1.ToString()).Name, UIHelper.ReplacePercentage(0, 1));
|
| | | var propertyConfig = PlayerPropertyConfig.Get(configFamilyTechOne.attrType);
|
| | | m_LowerCurrentAttribute.text = string.Format(Language.Get("MethodTo_A"),
|
| | | propertyConfig.Name, UIHelper.ReplacePercentage(0, propertyConfig.ISPercentage) +
|
| | | (propertyConfig.ISPercentage == 1 ? "%" : string.Empty));
|
| | | m_Properties.gameObject.SetActive(true);
|
| | | m_Properties.text = string.Format(Language.Get("MethodTo_B"), PlayerPropertyConfig.Get(_attrValue1.ToString()).Name, UIHelper.ReplacePercentage(configFamilyTech.attrValue, 1));
|
| | | m_Properties.text = string.Format(Language.Get("MethodTo_B"),
|
| | | propertyConfig.Name, UIHelper.ReplacePercentage(configFamilyTech.attrValue, propertyConfig.ISPercentage) +
|
| | | (propertyConfig.ISPercentage == 1 ? "%" : string.Empty));
|
| | | m_gameObject.SetActive(true);
|
| | | if (method._ContributionNumber >= configFamilyTech.needPoint)
|
| | | {
|
| | |
| | | CA607_tagCMFamilyTechLVUP tag_CA607 = new CA607_tagCMFamilyTechLVUP();
|
| | | tag_CA607.TechID = (uint)indexID;
|
| | | GameNetSystem.Instance.SendInfo(tag_CA607);
|
| | | // DebugEx.LogError("输出心法科技需要提升的技能IndexID"+ indexID);
|
| | | // DebugEx.LogError("输出心法科技需要提升的技能IndexID"+ indexID);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | indexID = MethodId[0];
|
| | | m_ScrollerController.JumpIndex(indexID - 1);
|
| | | m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见
|
| | | |
| | |
|
| | | if (AchievementGoto.guideAchievementId == 216)
|
| | | {
|
| | | if (Conditional())
|
| | |
| | | {
|
| | | if (Conditional())
|
| | | {
|
| | | AchievementGuideEffect1= AchievementGuideEffectPool.Require(1);
|
| | | AchievementGuideEffect1 = AchievementGuideEffectPool.Require(1);
|
| | | if (AchievementGuideEffect1.effect != null)
|
| | | {
|
| | | AchievementGuideEffect1.effect.ResetOrder(3500);
|