Skill Logic
Implemented basic UI for skills to player
This commit is contained in:
23
3D blobici/Assets/Scripts/Cards/CardUI.cs
Normal file
23
3D blobici/Assets/Scripts/Cards/CardUI.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
|
||||
public class CardUI : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private string cardname;
|
||||
[SerializeField] private PlayerSkillTree.Skills skill;
|
||||
|
||||
public PlayerSkillTree.Skills Skill { get => skill; private set => skill = value; }
|
||||
public string Name { get => cardname; private set => cardname = value; }
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Skill = skill;
|
||||
GetComponent<Button>().onClick.AddListener(OnCardClicked);
|
||||
}
|
||||
|
||||
private void OnCardClicked()
|
||||
{
|
||||
CardManager.Instance.SelectCard(Skill);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user