hch
3 天以前 df03c997716c6f5fbd4b87c01caef1d2e75165fc
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using UnityEngine;
using UnityEngine.UI;
 
public class AffairFuncCell : MonoBehaviour
{
    [SerializeField] Image lockImg;
    [SerializeField] ImageEx titleBG;
    [SerializeField] Text titleText;
    [SerializeField] Button funcBtn;
    public int funcID;
 
    void Start()
    { 
        funcBtn.AddListener(OnClickFunc);
    }
 
    void OnEnable()
    {
        if (funcID != 0 &&FuncOpen.Instance.IsFuncOpen(funcID))
        {
            lockImg.SetActive(false);
            titleBG.gray = false;
            //DED4C8
            titleText.color = new Color32(222, 212, 200, 255);
        }
        else
        {
            lockImg.SetActive(true);
            titleBG.gray = true;
            titleText.color = UIHelper.GetUIColor(TextColType.Gray);
        }
        
    }
 
    void OnClickFunc()
    {
        if (!FuncOpen.Instance.IsFuncOpen(funcID, true))
        {
            return;
        }
 
        if (funcID == 8)
        {
            UIManager.Instance.OpenWindow<GoldRushWorkerWin>();
        }
        // else if (funcID == 214)
        // { 
        //     GoldRushManager.Instance.NotifyGoldRushEvent(0, 0, 2);
        // }
 
    }
}