public void LateTick() { var distance = Vector3.Distance(_runnerFacade.Position, _chaserFacade.Position); if (distance > 100f) { _chaserFacade.Die(); } }
private void OnCollisionEnter(Collision other) { if (_lifeTime < 2f) { return; } if (other.transform.CompareTag("Road") || !(other.relativeVelocity.magnitude > 20f)) { return; } _lifeTime = 0f; _chaserFacade.Die(); }