32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class EquipmentInfo : MonoBehaviour
|
|
{
|
|
[SerializeField] private Text localName;
|
|
[SerializeField] private Text desqription;
|
|
|
|
[SerializeField] private Image icon;
|
|
[SerializeField] private Button AddButton;
|
|
|
|
private void Start()
|
|
{
|
|
CardAbout(0);
|
|
}
|
|
|
|
public void CardAbout(int _index)
|
|
{
|
|
localName.text = MainMenuScript.main.allEquipment[_index].GetComponent<Equipment>().equipmentConfig.equipmentCharacteristics.name;
|
|
desqription.text = MainMenuScript.main.allEquipment[_index].GetComponent<Equipment>().equipmentConfig.equipmentCharacteristics.description;
|
|
icon.sprite = MainMenuScript.main.allEquipment[_index].GetComponent<Equipment>().equipmentConfig.equipmentCharacteristics.sprite;
|
|
if (MainMenuScript.main.EquipedOrNot(MainMenuScript.main.lastCardNum))
|
|
AddButton.GetComponentInChildren<Text>().text = "UnEquip";
|
|
|
|
|
|
else
|
|
AddButton.GetComponentInChildren<Text>().text = "Equip";
|
|
}
|
|
}
|