少年修仙传客户端代码仓库
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
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
 
namespace vnxbqy.UI
{
    public class HumanThreeDimensionsBehaviour : MonoBehaviour
    {
        [SerializeField] Canvas m_TreasureCanva;
        [SerializeField] Transform m_ContainerLock;
        [SerializeField] Transform m_ContainerCollecting;
        [SerializeField] Text m_TreasureName;
        [SerializeField] Transform m_ContainerCollected;
 
        static readonly char[] split_identify = new char[1] { ' ' };
 
        int treasureId = 0;
 
        TreasureModel model { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
 
        public void Display(int treasureId)
        {
            this.treasureId = treasureId;
            DisplayBase();
            DisplayState();
        }
 
        void DisplayBase()
        {
            var config = TreasureConfig.Get(treasureId);
            m_TreasureName.text = Language.Get("BlastFurnace107", config.Name);
        }
 
        void DisplayState()
        {
            Treasure treasure;
            if (model.TryGetTreasure(treasureId, out treasure))
            {
                m_ContainerCollecting.SetActive(treasure.state == TreasureState.Collecting);
                m_ContainerCollected.SetActive(treasure.state == TreasureState.Collected);
                m_ContainerLock.SetActive(treasure.state == TreasureState.Locked);
            }
        }
 
        public void SetCamera(Camera camera)
        {
            m_TreasureCanva.worldCamera = camera;
        }
 
        private void LateUpdate()
        {
            if (!gameObject.layer.Equals(LayerUtility.DevisableUI))
            {
                LayerUtility.SetLayer(gameObject, LayerUtility.DevisableUI, true);
            }
        }
 
        public void Dispose()
        {
        }
    }
}