hch
5 小时以前 bc6f633a2f3cfc01122d8fd4452f69313ddcb32b
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
53
54
55
using System.Text;
using UnityEngine;
using UnityEngine.UI;
 
public class FuncPresetUnLockWin : UIBase
{
    [SerializeField] Text processText;
    [SerializeField] Text[] conditionTexts;
    [SerializeField] Text[] stateTexts;
 
    protected override void OnPreOpen()
    {
        conditionTexts[0].text = Language.Get("FuncPreset3", FuncPresetManager.Instance.openConditions[0]);
        conditionTexts[1].text = Language.Get("FuncPreset4", FuncPresetManager.Instance.openConditions[1] / 100,
        FuncPresetManager.Instance.openConditions[1] % 100);
        conditionTexts[2].text = Language.Get("FuncPreset5", FuncPresetManager.Instance.openConditions[2] / 100,
        FuncPresetManager.Instance.openConditions[2] % 100);
        int unLockCnt = 0;
 
        if (TimeUtility.OpenDay + 1 >= FuncPresetManager.Instance.openConditions[0])
        {
            stateTexts[0].text = UIHelper.AppendColor(TextColType.Green, Language.Get("FuncPreset6"));
            unLockCnt++;
        }
        else
        {
            stateTexts[0].text = UIHelper.AppendColor(TextColType.Red, Language.Get("WarlordPavilion14"));
        }
 
        if (PlayerDatas.Instance.baseData.ExAttr1 / 100 > FuncPresetManager.Instance.openConditions[1])
        {
            stateTexts[1].text = UIHelper.AppendColor(TextColType.Green, Language.Get("FuncPreset6"));
            unLockCnt++;
        }
        else
        {
            stateTexts[1].text = UIHelper.AppendColor(TextColType.Red, Language.Get("WarlordPavilion14"));
        }
 
        WarlordPavilionManager.Instance.TryGetHistoryMaxFinishProgress(out int layerNum, out int levelNum);
        var passLayerNum = layerNum * 100 + levelNum;
        if (passLayerNum >= FuncPresetManager.Instance.openConditions[2])
        {
            stateTexts[2].text = UIHelper.AppendColor(TextColType.Green, Language.Get("FuncPreset6"));
            unLockCnt++;
        }
        else
        {
            stateTexts[2].text = UIHelper.AppendColor(TextColType.Red, Language.Get("WarlordPavilion14"));
        }
 
        processText.text = Language.Get("FuncPreset2") + Language.Get("HeroFates11", unLockCnt, FuncPresetManager.Instance.openConditions.Length);
 
    }
}