public void ChangeStat(statType stat, int statValue) { switch (stat) { case statType.Health: { health = statValue; break; } case statType.Slime: { slime = statValue; break; } case statType.ActionPoints: { actionPoints = statValue; break; } case statType.ExpPool: { expPool = statValue; break; } case statType.ElementSlots: { elementSlots = Mathf.Clamp(statValue, 0, 7); break; } } }
public void AddToStat(statType stat, element element, int increment) { switch (stat) { case statType.Damage: { fixedDamageStats[element] += increment; break; } case statType.DamagePercent: { percentDamageStats[element] += increment; break; } case statType.Res: { fixedResStats[element] += increment; break; } case statType.Health: { health += increment; break; } case statType.Slime: { slime += increment; break; } case statType.ActionPoints: { actionPoints += increment; break; } case statType.ExpPool: { expPool += increment; break; } case statType.ElementSlots: { elementSlots += increment; break; } } }
public StatWrapper(statType type, int valueAvgCount) { curStatType = type; // Using the just set curStatType, initialize the counter for that stat. initializeCounter(); // Create & Populate the value array used for averaging stat readings. valueArray = new int[valueAvgCount]; for (int i = 0; i < valueArray.Length; i++) { getValue(); // Fill the valueArray with initial data. } }
public void ChangeStat(statType stat, element element, int statValue) { switch (stat) { case statType.Damage: { fixedDamageStats[element] = statValue; break; } case statType.DamagePercent: { percentDamageStats[element] = statValue; break; } case statType.Res: { fixedResStats[element] = statValue; break; } } }
/// <summary> /// Performs focal statistics /// </summary> /// <param name="inRaster"></param> /// <param name="window">defined neighborhood window</param> /// <param name="stat">defined statistic from imageAnaysisUtil enum</param> /// <param name="outRst">the name of the output raster</param> public IGeoProcessorResult focalRaster(object inRaster, IGPSANeighborhood window, statType stat, string outRst) { FocalStatistics fstats = new FocalStatistics(); fstats.neighborhood = window; fstats.out_raster = outRst; fstats.statistics_type = stat.ToString(); fstats.in_raster = inRaster; return(gpExecute(fstats)); }
public bool StatCheck(statType stat, int reqAmt, int curStat) { return(curStat >= reqAmt ? true : false); }
// Use this for initialization void Start() { nType = statType.attack; }
public void UpdateText(statType stat) { switch (stat) { case statType.hp: _healthText.text = "Hp: " + $"<color=green>{__currentHp} / {__maxHp}</color>"; break; case statType.dexterity: _dexteirtyText.text = "Dex: " + $"<color=green>{__dexterity}</color>"; break; case statType.coins: _coinsText.text = "$: " + $"<color=green>{__coins}</color>"; break; /*case statType.intelligence: * _intelligenceText.text = "Int: " + $"<color=green>{__intelligence}</color>"; * break;*/ case statType.strength: _strengthText.text = "Str: " + $"<color=green>{__strength}</color>"; break; case statType.endurance: _enduranceText.text = "End: " + $"<color=green>{__endurance}</color>"; break; case statType.experience: _experienceText.text = "Exp: " + $"<color=green>{__experience} / {__experienceNeededToLvlUp}</color>"; break; case statType.lvl: _lvlText.text = "Lvl: " + $"<color=green>{lvl}</color>"; break; case statType.ac: _acText.text = "AC: " + $"<color=green>{armorClass}</color>"; break; case statType.noise: _noiseText.text = "Noise: " + $"<color=green>{__noise}</color>"; break; case statType.blood: _bloodText.text = "Blood: " + $"<color=red>{__blood}%</color>"; break; case statType.sanity: if (__sanity <= 20) { _sanityText.text = "Sanit: " + $"<color=red>{__sanity}% <size=15>(Insane)</size></color>"; } else if (__sanity <= 50) { _sanityText.text = "Sanit: " + $"<color=red>{__sanity}% <size=15>(Paranoid)</size></color>"; } else if (__sanity <= 70) { _sanityText.text = "Sanit: " + $"<color=red>{__sanity}% <size=15>(Nervous)</size></color>"; } else { _sanityText.text = "Sanit: " + $"<color=red>{__sanity}% <size=15>(Excellent)</size></color>"; } break; } } //update stats in ui
/// <summary> /// Performs focal statistics /// </summary> /// <param name="inRaster"></param> /// <param name="window">defined neighborhood window</param> /// <param name="stat">defined statistic from imageAnaysisUtil enum</param> /// <param name="outRst">the name of the output raster</param> public IGeoProcessorResult focalRaster(object inRaster, IGPSANeighborhood window, statType stat, string outRst) { FocalStatistics fstats = new FocalStatistics(); fstats.neighborhood = window; fstats.out_raster = outRst; fstats.statistics_type = stat.ToString(); fstats.in_raster = inRaster; return gpExecute(fstats); }
private IStat getStatTotal(statType type) { return(stats.First(l => l.type.Equals(type))); }