Beispiel #1
0
 public void MonsterNotDetected(MonsterSpotter spotter)
 {
     selfAwareness -= undetectionSpeed * Time.deltaTime;
 }
Beispiel #2
0
 public void MonsterDetected(MonsterSpotter spotter)
 {
     // monster saw itself, note location of spotter and set refugePoint to
     // opposite direction of spotter and maybe find hiding point near there.
     selfAwareness += selfDetectionSpeed * Mathf.Pow((spotter.transform.position - transform.position).magnitude, -2f) * Time.deltaTime;
 }