예제 #1
0
파일: Thinker.cs 프로젝트: gewl/fortda
 public void OnHearImpactSound(Transform noisyObject)
 {
     objectsInvestigating.Push(noisyObject);
     if (stateMachine.IsInState(typeof(SpottedObjectState)))
     {
         return;
     }
     Alert();
     if (stateMachine.IsInState(typeof(InvestigatingSoundState)))
     {
         stateMachine.Hesitate();
         CompareDistancesToInvestigate(noisyObject);
     }
     else
     {
         stateMachine.SwitchState(new InvestigatingSoundState(stateMachine));
     }
 }