From 3fb2121cc0d00cbd42b2ca10b5dfb399a4df1a04 Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Thu, 21 Mar 2024 10:28:46 +0800 Subject: *misc --- GameCode/UpgradeButton.cs | 167 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 GameCode/UpgradeButton.cs (limited to 'GameCode/UpgradeButton.cs') diff --git a/GameCode/UpgradeButton.cs b/GameCode/UpgradeButton.cs new file mode 100644 index 0000000..271976b --- /dev/null +++ b/GameCode/UpgradeButton.cs @@ -0,0 +1,167 @@ +using System.Collections; +using UnityEngine; +using UnityEngine.UI; + +public class UpgradeButton : MonoBehaviour +{ + [SerializeField] + private string unlockString; + + [SerializeField] + public int xpCost; + + public int cardCountRequirement; + + [SerializeField] + private bool countsAsCardUnlock = true; + + [SerializeField] + private bool countAsDevelopment; + + [SerializeField] + private Sprite unlockedSprite; + + [SerializeField] + private bool checkAchievements; + + [SerializeField] + private GameObject priceTag; + + private GameObject currentPriceTag; + + private Image img; + + private Button btn; + + [SerializeField] + private UpgradeButton previous; + + [SerializeField] + private UpgradeButton[] next; + + public bool unlocked; + + private void Start() + { + img = GetComponent(); + btn = GetComponent