using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Buildings : MonoBehaviour { // Start is called before the first frame update public int Level; public int MaxLevel; public List upgradeNeeds_Wood; public List upgradeNeeds_Stone; public Canvas information_Panel; void Start() { Level = 1; //StartCoroutine(Second()); InvokeRepeating("AddResources_Auto", 1, 1); information_Panel.transform.Find("NextUpgradeNeeds").GetComponent().text = "下次升级所需物资:\n" + "木头" + upgradeNeeds_Wood[Level] + "\n" + "石头" + upgradeNeeds_Stone[Level]; } // Update is called once per frame void Update() { if (Level < MaxLevel) { if (Check_Upgrade()) { information_Panel.transform.Find("Upgrade").GetComponent