Added equipment influence to player, Added influence display, changed rarity from items, v1.3.0

This commit is contained in:
Nicola Sovic
2022-07-04 09:33:33 +02:00
parent e002a76690
commit 977f9ca5cf
5 changed files with 54 additions and 32 deletions

View File

@@ -55,10 +55,18 @@ namespace Assets.Scripts
inventory.itemDisplay.transform.Find("itemName").GetComponent<Text>().text = item.getName();
string text = "Stats:\r\n";
Dictionary<string, int> attributes = item.getAttributes();
foreach (string key in attributes.Keys)
if (item.getRarity() == ItemRarity.LEGENDARY)
{
text = text + key + ": " + attributes[key] + "\r\n";
text = "All stats: +" + attributes["STR"];
}
else
{
foreach (string key in attributes.Keys)
{
text = text + key + ": +" + attributes[key] + "\r\n";
}
}
inventory.itemDisplay.transform.Find("itemStats").GetComponent<Text>().text = text;
int changeY = 0;
if (inventory.itemDisplay.transform.localScale == new Vector3(0,0,0))