43 lines
1.3 KiB
C#
43 lines
1.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using TMPro;
|
|
|
|
public class SkillTreeInfoDisplay : MonoBehaviour
|
|
{
|
|
public GameObject displayPfb;
|
|
public TextMeshProUGUI displayName;
|
|
public TextMeshProUGUI description;
|
|
// public TextMeshProUGUI effectTxt;
|
|
public TextMeshProUGUI priceTxt;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
displayPfb = this.gameObject;
|
|
|
|
displayName = displayPfb.GetComponentsInChildren<TextMeshProUGUI>()[0];
|
|
description = displayPfb.GetComponentsInChildren<TextMeshProUGUI>()[1];
|
|
// effectTxt = displayPfb.GetComponentsInChildren<TextMeshProUGUI>()[3];
|
|
priceTxt = displayPfb.GetComponentsInChildren<TextMeshProUGUI>()[2];
|
|
}
|
|
|
|
public void RemoveData(){
|
|
displayName.text = "";
|
|
description.text = "";
|
|
// effectTxt.text = "";
|
|
priceTxt.text = "";
|
|
}
|
|
|
|
public void DisplayData(SkillTreeItem _data){
|
|
displayName.text = _data.DisplayName;
|
|
description.text = _data.Description;
|
|
// effectTxt.text = "";
|
|
|
|
// foreach(SkillTreeEffect effect in _data.Effects){
|
|
// effectTxt.text += "" + effect.Stat;
|
|
// }
|
|
priceTxt.text = "" + _data.Price;
|
|
}
|
|
}
|