using System; using System.Collections; using System.Collections.Generic; using UnityEngine; namespace BlueWaterProject { public class Jail : MonoBehaviour { private InShipMapInfo inShipMapInfo; [field: SerializeField] public bool IsUsed { get; set; } private void Awake() { inShipMapInfo = GameObject.Find("InShipMap").GetComponent(); inShipMapInfo.Jails.Add(this); } public void UseJail() { if (IsUsed) return; IsUsed = true; } public void ReleaseJail() { if (!IsUsed) return; IsUsed = false; } } }