using System.Collections; using System.Collections.Generic; using TableConfig; using UnityEngine; using UnityEngine.UI; namespace Snxxz.UI { public class RealmStageBehaviour : MonoBehaviour { [SerializeField] RealmIcon m_RealmIcon; [SerializeField] Image m_RealmCompleted; [SerializeField] Image m_Arrow; [SerializeField] Image m_Last; public bool left { get; private set; } public int index { get; private set; } public void Display(int _realmLv, bool last, bool left, int index) { var config = Config.Instance.Get(_realmLv); var realmLevel = PlayerDatas.Instance.baseData.realmLevel; if (config != null) { m_RealmIcon.Display(_realmLv); m_RealmCompleted.gameObject.SetActive(realmLevel >= _realmLv); m_Arrow.gameObject.SetActive(realmLevel == _realmLv); m_Last.gameObject.SetActive(last); } this.left = left; this.index = index; } } }