Did stuff
This commit is contained in:
@@ -23,6 +23,18 @@ namespace Fruitomation.UI
|
||||
AttachedButton.onClick.AddListener(OnButtonClicked);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
string formatted = Regex.Replace(Building.ToString(), "[A-Z]", " $0")[1..];
|
||||
bool unlocked = UpgradeManager.Is(Building);
|
||||
|
||||
AttachedText.text = unlocked
|
||||
? $"{formatted}\nUnlocked"
|
||||
: $"{formatted}\n{Cost.AsString()}";
|
||||
|
||||
AttachedButton.interactable = !unlocked;
|
||||
}
|
||||
|
||||
private void OnButtonClicked()
|
||||
{
|
||||
UpgradeManager.Unlock(Building);
|
||||
|
||||
Reference in New Issue
Block a user