养成基本完毕,新UI,修bug,装备初步,

This commit is contained in:
2026-03-23 22:37:14 +08:00
parent 49e45ac464
commit dd205b6cb4
2349 changed files with 261722 additions and 283 deletions
+64
View File
@@ -0,0 +1,64 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Store
{
public class StoreScript : MonoBehaviour
{
public Button Gems;
public Button Coins;
public GameObject Gems_On;
public GameObject Gems_Off;
public GameObject Coins_On;
public GameObject Coins_Off;
[Space(10)]
public GameObject GemView;
public GameObject CoinView;
public void Start()
{
Gems_On.SetActive(true);
Gems_Off.SetActive(false);
Coins_Off.SetActive(true);
Coins_On.SetActive(false);
Gems.onClick.AddListener(gemsClick);
Coins.onClick.AddListener(coinsClick);
GemView.SetActive(true);
CoinView.SetActive(false);
}
void gemsClick()
{
Switch("gems");
}
void coinsClick()
{
Switch("coins");
}
public void Switch(string name)
{
if (name == "gems")
{
Gems_On.SetActive(true);
Gems_Off.SetActive(false);
Coins_Off.SetActive(true);
Coins_On.SetActive(false);
GemView.SetActive(true);
CoinView.SetActive(false);
}
else
{
Gems_On.SetActive(false);
Gems_Off.SetActive(true);
Coins_Off.SetActive(false);
Coins_On.SetActive(true);
GemView.SetActive(false);
CoinView.SetActive(true);
}
}
}
}