yyl
2025-12-01 ea185afc20a915d15eae8adb07d0acd837f3c210
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.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
 
/// <summary>
/// 坐骑外观激活
/// </summary>
public class HorseSkinGetWin : UIBase
{
    [SerializeField] HorseController horseModel;
    [SerializeField] Text horseName;
    [SerializeField] Transform attrObj;
    [SerializeField] Text attrText;
    [SerializeField] Button okbtn;
 
    protected override void InitComponent()
    {
        okbtn.AddListener(CloseWindow);
    }
 
    protected override void OnPreOpen()
    {
        Display();
    }
 
 
 
    void Display()
    {
        var skinID = functionOrder;
        var skinConfig = HorseSkinConfig.Get(skinID);
        horseModel.Create(skinID);
        horseName.text = skinConfig.Name;
 
        if (skinConfig.AttrIDList.IsNullOrEmpty())
        {
            attrObj.SetActive(false);
        }
        else
        {
            attrObj.SetActive(true);
 
            var dict = HorseManager.Instance.GetAttrBySkinID(skinConfig);
            var attrList = new List<string>();
 
            foreach (var kv in dict)
            {
                attrList.Add(PlayerPropertyConfig.GetFullDescription(kv.Key, kv.Value));
            }
            attrText.text = string.Join(Language.Get("L1112"), attrList);
        }
    }
 
}