public void ModifyStat(RPGStatType statName, float value)
        {
            RPGVital stat = null;

            if (StatCollection.TryGetStat <RPGVital> (statName, out stat))
            {
                stat.StatValueCurrent += value;
            }
        }
        public bool TryGetStatPercentValue(RPGStatType statName, out float value)
        {
            RPGVital stat = null;

            value = 0;
            if (StatCollection.TryGetStat <RPGVital> (statName, out stat))
            {
                value = stat.StatValueCurrent / stat.StatValue;
                return(true);
            }
            return(false);
        }
        public bool TryGetStatValue(RPGStatType statName, out int value)
        {
            RPGStat stat = null;

            value = 0;
            if (StatCollection.TryGetStat(statName, out stat))
            {
                value = stat.StatValue;
                return(true);
            }
            return(false);
        }
        public void ModifyStat(RPGStatType sourceStat, RPGStatType targetStat, float modifier, float flatValue, float baseValue)
        {
            float rawValue    = flatValue + modifier * baseValue;
            float bufferValue = 1.0f;

            if (sourceStat == RPGStatType.Power)
            {
                RPGStat stat = null;
                if (StatCollection.TryGetStat(RPGStatType.Defense, out stat))
                {
                    bufferValue = stat.StatValue;
                }
            }
            else if (sourceStat == RPGStatType.Mind)
            {
                RPGStat stat = null;
                if (StatCollection.TryGetStat(RPGStatType.Spirit, out stat))
                {
                    bufferValue = stat.StatValue;
                }
            }

            ModifyStat(targetStat, (int)((rawValue < 0) ? (-1) : (1) * rawValue * rawValue / bufferValue));
        }