Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class PlayerEquippedItemStats : MonoBehaviour
- {
- public Image helmetRarity;
- public Text helmetInfo;
- public Image swordRarity;
- public Text swordInfo;
- public Image bootsRarity;
- public Text bootsInfo;
- public PlayerStats playerStats;
- public ItemDrop itemDrop;
- private ItemManager itemManager;
- ItemQuality quality;
- // Use this for initialization
- void Start ()
- {
- playerStats = PlayerStats.instance;
- itemDrop = ItemDrop.instance;
- itemManager = ItemManager.instance;
- HelmetInfo();
- SwordInfo();
- BootsInfo();
- }
- // Update is called once per frame
- void Update ()
- {
- }
- public void HelmetInfo()
- {
- helmetInfo.text = GetEquippedItemInfo(ItemType.Helmet);
- }
- public void SwordInfo()
- {
- swordInfo.text = GetEquippedItemInfo(ItemType.Sword);
- }
- public void BootsInfo()
- {
- bootsInfo.text = GetEquippedItemInfo(ItemType.Boots);
- }
- private string GetEquippedItemInfo(ItemType itemType)
- {
- return itemDrop.ConstructStatBlock(out quality, playerStats.equippedItems[(int)itemType]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement