Potion Logic
Most of the potion logic for now
This commit is contained in:
@@ -13,6 +13,7 @@ public class CardManager : MonoBehaviour
|
||||
|
||||
private PlayerSkillTree playerSkillTree;
|
||||
private GameObject cards;
|
||||
private PotionHandler potionHandler;
|
||||
|
||||
|
||||
private void Awake()
|
||||
@@ -25,6 +26,7 @@ public class CardManager : MonoBehaviour
|
||||
{
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void Start()
|
||||
@@ -79,9 +81,9 @@ public class CardManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void SelectCard(PlayerSkillTree.Skills skill)
|
||||
public void SelectCard(PlayerSkillTree.Skills skill, PotionHandler.PotionType potionType)
|
||||
{
|
||||
playerSkillTree.UnlockSkill(skill);
|
||||
playerSkillTree.UnlockSkill(skill, potionType);
|
||||
|
||||
foreach (Transform child in cardsParent)
|
||||
{
|
||||
|
||||
@@ -7,6 +7,8 @@ public class CardUI : MonoBehaviour
|
||||
[SerializeField] private string cardname;
|
||||
[SerializeField] private PlayerSkillTree.Skills skill;
|
||||
|
||||
[SerializeField] private PotionHandler.PotionType potionType = PotionHandler.PotionType.None;
|
||||
|
||||
public PlayerSkillTree.Skills Skill { get => skill; private set => skill = value; }
|
||||
public string Name { get => cardname; private set => cardname = value; }
|
||||
|
||||
@@ -18,6 +20,6 @@ public class CardUI : MonoBehaviour
|
||||
|
||||
private void OnCardClicked()
|
||||
{
|
||||
CardManager.Instance.SelectCard(Skill);
|
||||
CardManager.Instance.SelectCard(Skill, potionType);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user