using UnityEngine; public class SafeZone : MonoBehaviour { public SafeZoneStats stats; [SerializeField] CircleCollider2D moatCollider; public bool IsInSafeZone { get; private set; } = true; public void EnterSafeZone() { moatCollider.enabled = false; IsInSafeZone = true; } public void ExitSafeZone() { moatCollider.enabled = true; IsInSafeZone = false; } public Vector3 GetOutsidePosition(Vector2 direction) { return transform.position + (moatCollider.radius + stats.jumpOffset) * (Vector3)direction; } }