Exemple #1
0
    public void StopSightStress(HumanoidModel aggressor)
    {
        ChronicStressor stressor = null;

        sightStressors.TryGetValue(aggressor, out stressor);
        if (stressor != null)
        {
            RemoveChronicStressor(stressor);
        }
        sightStressors.Remove(aggressor);
    }
Exemple #2
0
    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());
        }
    }
Exemple #3
0
 protected void RemoveChronicStressor(ChronicStressor stressor)
 {
     chronicStressors.Remove(stressor);
 }
Exemple #4
0
 protected void AddChronicStressor(ChronicStressor stressor)
 {
     chronicStressors.Add(stressor);
 }