using System; using Base; using UnityEngine; using UnityEngine.UI; namespace Map { public class MiniMap : MonoBehaviour, ITickUI { public Image background; public RawImage texture; private bool _show = true; public void OnEnable() { Clock.AddTickUI(this); } private void OnDisable() { Clock.RemoveTickUI(this); } public void TickUI() { if (_show != Setting.Instance.CurrentSettings.showMiniMap) { _show = Setting.Instance.CurrentSettings.showMiniMap; texture.gameObject.SetActive(_show); background.enabled = _show; } } } }