示例#1
0
        public int GetStat(CharacterStat stat, ProgressionRate rate, int level)
        {
            BuildLookup();

            if (progressionLookup.ContainsKey(rate.ToString()))
            {
                if (progressionLookup[rate.ToString()].ContainsKey(stat.ToString()))
                {
                    float[] levels = progressionLookup[rate.ToString()][stat.ToString()];
                    if (level > levels.Length - 1)
                    {
                        Debug.LogWarning("Level out of Range");
                        level = (int)levels[levels.Length - 1];
                    }

                    return((int)levels[level]);
                }
                Debug.LogError("Stat Not Found");
                return(0);
            }
            Debug.LogError("Progression Rate Not Found");
            return(0);
        }