Exemple #1
0
        /// <summary>
        /// 通过等级获取体育数值
        /// </summary>
        /// <param name="level"></param>
        /// <returns></returns>
        public static PhysicalUpgradeNumerialSetting FindPhysicalUpgradeNumerialByLevel(int level)
        {
            for (int i = 0; i < _physicalUpgradeNumerialList.Count; i++)
            {
                PhysicalUpgradeNumerialSetting setting = _physicalUpgradeNumerialList[i];
                if (setting.level.ToInt32() == level)
                {
                    return(setting);
                }
            }
            Debug.Log("寻找一个不存在的 _physicalUpgradeNumerialList,level为" + level);

            return(null);
        }
Exemple #2
0
    /// <summary>
    /// 刷新属性升级后需要调用
    /// </summary>
    void RefreshProperty(PropertyData propertyData)
    {
        //学习
        TestNumerialSetting  studySetting   = DataTable.FindTestNumerialByLevel(propertyData.Level);
        List <List <float> > studyProChange = CommonUtil.Split2CfgFloat(studySetting.proChange);

        InitPropertyChangeWithNumerial(propertyData, studyProChange);


        //体育
        PhysicalUpgradeNumerialSetting physicalSetting   = DataTable.FindPhysicalUpgradeNumerialByLevel(propertyData.PhysicalLevel);
        List <List <float> >           physicalProChange = CommonUtil.Split2CfgFloat(physicalSetting.proChange);

        InitPropertyChangeWithNumerial(propertyData, physicalProChange);

        //艺术
        ArtUpgradeNumerialSetting artSetting   = DataTable.FindArtUpgradeNumerialByLevel(propertyData.ArtLevel);
        List <List <float> >      artProChange = CommonUtil.Split2CfgFloat(artSetting.proChange);

        InitPropertyChangeWithNumerial(propertyData, artProChange);
    }