From c5f145786f4c6d2fe4bea831dfc16e52228920a5 Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Sun, 19 May 2024 16:05:01 +0800 Subject: * move --- GameCode/ChoiceUI.cs | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 GameCode/ChoiceUI.cs (limited to 'GameCode/ChoiceUI.cs') diff --git a/GameCode/ChoiceUI.cs b/GameCode/ChoiceUI.cs deleted file mode 100644 index 62415e2..0000000 --- a/GameCode/ChoiceUI.cs +++ /dev/null @@ -1,48 +0,0 @@ -using TMPro; -using UnityEngine; -using UnityEngine.UI; - -public class ChoiceUI : MonoBehaviour -{ - public Choice choice; - - public TMP_Text title; - - public TMP_Text description; - - public GameObject selected; - - public Image icon; - - public GameObject unlocked; - - public GameObject locked; - - private bool isunlocked; - - public bool IsUnlocked => isunlocked; - - public void SetChoice(Choice _choice) - { - if (!_choice.requiresUnlocked) - { - isunlocked = true; - } - else - { - isunlocked = PerkManager.instance.UnlockedEquippables.Contains(_choice.requiresUnlocked); - } - unlocked.SetActive(isunlocked); - locked.SetActive(!isunlocked); - choice = _choice; - title.text = _choice.name; - description.text = _choice.tooltip; - icon.sprite = _choice.icon; - SetHighlighted(_highlighted: false); - } - - public void SetHighlighted(bool _highlighted) - { - selected.SetActive(_highlighted); - } -} -- cgit v1.1-26-g67d0