they call me Sylvia because i am Sylvia

This commit is contained in:
Sylvia 2026-03-19 00:09:15 -07:00
parent fc1d1dee00
commit 99cda5f6b9
3 changed files with 482 additions and 32 deletions

View file

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
@ -54,13 +55,18 @@ public class AbilityUIHandler : MonoBehaviour
public void UpdateAbilitySelection()
{
uiObjects[0].onClick.AddListener(() => ShowAbilityUI(playerAbilityHandler.mainAttackInstance));
uiObjects[0].GetComponentInChildren<TextMeshProUGUI>().text = playerAbilityHandler.mainAttackInstance.abilityName;
uiObjects[1].onClick.AddListener(() => ShowAbilityUI(playerAbilityHandler.secondaryAttackInstance));
uiObjects[1].GetComponentInChildren<TextMeshProUGUI>().text = playerAbilityHandler.secondaryAttackInstance.abilityName;
uiObjects[2].onClick.AddListener(() => ShowAbilityUI(playerAbilityHandler.spellAInstance));
uiObjects[2].GetComponentInChildren<TextMeshProUGUI>().text = playerAbilityHandler.spellAInstance.abilityName;
uiObjects[3].onClick.AddListener(() => ShowAbilityUI(playerAbilityHandler.spellBInstance));
uiObjects[3].GetComponentInChildren<TextMeshProUGUI>().text = playerAbilityHandler.spellBInstance.abilityName;
}
public void ShowAbilityUI(PlayerAbility ability)
{
abilityUI.gameObject.SetActive(true);
abilityUI.thisAbility = ability;
abilityUI.UpdateUI();
}