少年修仙传客户端代码仓库
client_Zxw
2018-09-19 ab3e936c7be0fdcc6c814cc0cb0e4c88a0f346eb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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<RealmConfig>(_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;
        }
    }
}