hch
1 天以前 89fa96e505af9fe7baf676591222bfdb23b48262
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
using UnityEngine;
using UnityEngine.UI;
 
public class PhantasmPavilionPutOnButton : MonoBehaviour
{
    [SerializeField] ButtonEx btnPutOn;
    [SerializeField] ImageEx imgPutOn;
    [SerializeField] TextEx txtPutOn;
    [SerializeField] Image imgRed;
    PhantasmPavilionType type;
    int id;
    PhantasmPavilionManager manager { get { return PhantasmPavilionManager.Instance; } }
    public void Display(int id)
    {
        type = manager.nowType;
        this.id = id;
        btnPutOn.SetListener(() =>
        {
            manager.SendOPPack(type, PhantasmPavilionOperation.Wear, (uint)id);
        });
        
        bool isUsing = manager.IsUsing(type, id);
        if (type == PhantasmPavilionType.Title)
        {
            txtPutOn.text = Language.Get("EquipExchangeWin9");
            btnPutOn.interactable = true;
            imgPutOn.gray = false;
        }
        else
        {
 
            txtPutOn.text = Language.Get(isUsing ? "PhantasmPavilion09" : "EquipExchangeWin9");
            imgPutOn.gray = isUsing;
            btnPutOn.interactable = !isUsing;
        }
 
    }
 
}