Esempio n. 1
0
 // Just always hear the sound if we get sent this
 public void DetectDistractionSound(DetectedSound detectedSound)
 {
     if (monsterStateGoToSound != null)
     {
         float newSoundPriority = detectedSound.GetPriority(transform.position);
         TransitionToStateGoToSound(detectedSound, newSoundPriority);
     }
 }
Esempio n. 2
0
 // When a sound make a noise, it calls this to alert the monster to it
 public void DetectSound(DetectedSound detectedSound)
 {
     if (monsterStateGoToSound != null)
     {
         // Sound priority must be above threshold
         float newSoundPriority = detectedSound.GetPriority(transform.position);
         if (newSoundPriority > hearSoundThreshold)
         {
             TransitionToStateGoToSound(detectedSound, newSoundPriority);
         }
     }
 }