private void TargetLostBark() { timeLostVision = Time.time; playerStatus = PlayerDetectionStatus.ChasedNotVisible; StopAllCoroutines(); StartCoroutine(TryLostBark(lostBark)); }
private void TargetSpottedBark() { if (playerStatus == PlayerDetectionStatus.Hidden) { StartBark(spottedBark); numTimesSpotted = 0; } else if (playerStatus == PlayerDetectionStatus.ChasedNotVisible) { if (numTimesSpotted >= 3) { StartBark(spottedBark); numTimesSpotted = 0; } else { numTimesSpotted++; } } playerStatus = PlayerDetectionStatus.Visible; }
private void SetPlayerStatusHidden() { playerStatus = PlayerDetectionStatus.Hidden; timeLastHiddenBark = Time.time; }