少年修仙传客户端代码仓库
hch
2025-06-12 204ef05a831c9484e2abc561d27ecbff7c797453
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using LitJson;
 
namespace vnxbqy.UI
{
    public class RealmBriefBehaviour : MonoBehaviour
    {
        [SerializeField] Image nowRealmImg;
        [SerializeField] Image nextRealmImg;
        [SerializeField] Text nowLVLimitText;
        [SerializeField] Text nextLVLimitText;
        [SerializeField] List<Text> m_Properties;
        [SerializeField] List<Text> m_NextProperties;
        [SerializeField] Text unLockEffect; //境界解锁效果:技能,装备,灵根等
        [SerializeField] Button unLockEffectBtn;
        [SerializeField] Button unLockEffectShowAllBtn;
        [SerializeField] UIEffect unlockUIEffect;
        [SerializeField] List<RealmMissionCell> missionObjs;
 
 
 
        public void Display()
        {
            var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel);
            var nextConfig = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel + 1);
            nextConfig = nextConfig == null ? config : nextConfig;
            nowRealmImg.SetSprite(config.Img);
            nextRealmImg.SetSprite(nextConfig.Img);
            nowLVLimitText.text = Language.Get("LoadIconLV", config.LVMax);
            nextLVLimitText.text = Language.Get("LoadIconLV", nextConfig.LVMax);
 
            for (int i = 0; i < m_Properties.Count; i++)
            {
                if (config.AddAttrType.Length > i)
                {
                    m_Properties[i].text = PlayerPropertyConfig.GetFullDescription(config.AddAttrType[i], config.AddAttrNum[i]);
                }
                else
                {
                    m_Properties[i].text = "";
                }
            }
 
            for (int i = 0; i < m_NextProperties.Count; i++)
            {
                if (nextConfig.AddAttrType.Length > i)
                {
                    m_NextProperties[i].text = PlayerPropertyConfig.GetFullDescription(nextConfig.AddAttrType[i], nextConfig.AddAttrNum[i]);
                }
                else
                {
                    m_NextProperties[i].text = "";
                }
            }
 
            unlockUIEffect.Stop();
 
            if (nextConfig.LearnSkillIDInfo.Count > 0)
            {
                var skillID = nextConfig.LearnSkillIDInfo[PlayerDatas.Instance.baseData.Job][0];
                var skillConfig = SkillConfig.Get(skillID);
                unLockEffect.text = Language.Get("RealmUnLockSkill", skillConfig.SkillName);
                unLockEffectBtn.SetListener(() => {
                    SkillDetails.ShowSkillDetails(skillID, SkillDetails.SkillSourceType.PlayerSkill, skillConfig.FightPower);
                });
            }
            else if (nextConfig.AddFreePoint > 0)
            {
                unLockEffect.text = Language.Get("RealmUnLockLG", nextConfig.AddFreePoint);
                unLockEffectBtn.RemoveAllListeners();
            }
            else if (nextConfig.EquipLV > 0)
            {
                unLockEffect.text = Language.Get("RealmUnLockEquip", Language.Get("RealmEquipName", nextConfig.NameEx));
                unLockEffectBtn.SetListener(() =>
                {
                    WindowCenter.Instance.Open<RealmEquipPreviewWin>(false, nextConfig.EquipLV);
                });
                unlockUIEffect.Play();
            }
            else
            {
                unLockEffect.text = "";
                unLockEffectBtn.SetActive(false);
                unLockEffectBtn.RemoveAllListeners();
            }
 
            unLockEffectShowAllBtn.AddListener(() =>
                {
                    WindowCenter.Instance.Open<RealmUnlockEffectWin>();
                }
            );
 
            var missions = RealmLVUPTaskConfig.GetMissionIDs(PlayerDatas.Instance.baseData.realmLevel);
            for (int i = 0; i < missionObjs.Count; i++)
            {
                missionObjs[i].Display(missions[i]);
            }
 
        }
 
 
    }
}