|
@@ -9,7 +9,7 @@ public struct Treasure
|
|
|
public int id;
|
|
public int id;
|
|
|
public string name;
|
|
public string name;
|
|
|
public Sprite sprite;
|
|
public Sprite sprite;
|
|
|
- public Color qualityIcon;
|
|
|
|
|
|
|
+ public Sprite qualityBox;
|
|
|
public Color qualityText;
|
|
public Color qualityText;
|
|
|
public List<int> tagsId;
|
|
public List<int> tagsId;
|
|
|
public List<Sprite> tags;
|
|
public List<Sprite> tags;
|
|
@@ -18,12 +18,12 @@ public struct Treasure
|
|
|
public List<string> type;
|
|
public List<string> type;
|
|
|
public List<float> data;
|
|
public List<float> data;
|
|
|
|
|
|
|
|
- public Treasure(int id, string name, Sprite sprite, Color qualityIcon, Color qualityText, List<int> tagsId, List<Sprite> tags, string attribute, int price, List<string> type, List<float>data)
|
|
|
|
|
|
|
+ public Treasure(int id, string name, Sprite sprite, Sprite qualityBox, Color qualityText, List<int> tagsId, List<Sprite> tags, string attribute, int price, List<string> type, List<float>data)
|
|
|
{
|
|
{
|
|
|
this.id = id;
|
|
this.id = id;
|
|
|
this.name = name;
|
|
this.name = name;
|
|
|
this.sprite = sprite;
|
|
this.sprite = sprite;
|
|
|
- this.qualityIcon = qualityIcon;
|
|
|
|
|
|
|
+ this.qualityBox = qualityBox;
|
|
|
this.qualityText = qualityText;
|
|
this.qualityText = qualityText;
|
|
|
this.tagsId = new List<int>(tagsId);
|
|
this.tagsId = new List<int>(tagsId);
|
|
|
this.tags = new List<Sprite>(tags);
|
|
this.tags = new List<Sprite>(tags);
|
|
@@ -45,6 +45,7 @@ public class TreasuresSaleUI : MonoBehaviour
|
|
|
[FoldoutGroup("×é¼þ")] public TextMeshProUGUI attribute;
|
|
[FoldoutGroup("×é¼þ")] public TextMeshProUGUI attribute;
|
|
|
[FoldoutGroup("×é¼þ")] public ButtonUI buy;
|
|
[FoldoutGroup("×é¼þ")] public ButtonUI buy;
|
|
|
[FoldoutGroup("×é¼þ")] public TextMeshProUGUI price;
|
|
[FoldoutGroup("×é¼þ")] public TextMeshProUGUI price;
|
|
|
|
|
+ [FoldoutGroup("×é¼þ")] public List<Sprite> TreasureBackgrounds;
|
|
|
|
|
|
|
|
public bool islock;
|
|
public bool islock;
|
|
|
public bool isNull;
|
|
public bool isNull;
|
|
@@ -65,7 +66,7 @@ public class TreasuresSaleUI : MonoBehaviour
|
|
|
ShowLockImg();
|
|
ShowLockImg();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- iconBackground.color = treasure.qualityIcon;
|
|
|
|
|
|
|
+ iconBackground.sprite = treasure.qualityBox;
|
|
|
icon.sprite = treasure.sprite;
|
|
icon.sprite = treasure.sprite;
|
|
|
int type = treasure.tags.Count % 2;
|
|
int type = treasure.tags.Count % 2;
|
|
|
int len = treasure.tags.Count / 2;
|
|
int len = treasure.tags.Count / 2;
|
|
@@ -94,6 +95,14 @@ public class TreasuresSaleUI : MonoBehaviour
|
|
|
tag.gameObject.SetActive(false);
|
|
tag.gameObject.SetActive(false);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ if (treasure.tags.Count == 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ transform.GetComponent<Image>().sprite = TreasureBackgrounds[1];
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ transform.GetComponent<Image>().sprite = TreasureBackgrounds[0];
|
|
|
|
|
+ }
|
|
|
nameText.text = treasure.name;
|
|
nameText.text = treasure.name;
|
|
|
nameText.color = treasure.qualityText;
|
|
nameText.color = treasure.qualityText;
|
|
|
attribute.text = treasure.attribute;
|
|
attribute.text = treasure.attribute;
|