public void StopSightStress(HumanoidModel aggressor) { ChronicStressor stressor = null; sightStressors.TryGetValue(aggressor, out stressor); if (stressor != null) { RemoveChronicStressor(stressor); } sightStressors.Remove(aggressor); }
public void PendSightStress(float coverDisparity, HumanoidModel aggressor) { ChronicStressor stressor = null; sightStressors.TryGetValue(aggressor, out stressor); if (stressor == null) { stressor = StressorFactory.CreateSightStressor(coverDisparity, coverDisparityModifier); sightStressors.Add(aggressor, stressor); AddChronicStressor(stressor); } else { ChronicStressor newStressor = StressorFactory.CreateSightStressor(coverDisparity, coverDisparityModifier); stressor.ModifySeverity(newStressor.GetSeverity()); } }
protected void RemoveChronicStressor(ChronicStressor stressor) { chronicStressors.Remove(stressor); }
protected void AddChronicStressor(ChronicStressor stressor) { chronicStressors.Add(stressor); }