// Update is called once per frame void Update() { if (build.CheckFinish() && build.CheckSelect()) { constructUI.gameObject.SetActive(true); } else { constructUI.gameObject.SetActive(false); } if (constructUI.CheckClick()) { constructShow = !constructShow; constructUI.SetClick(false); } if (build.CheckSelect() && build.CheckFinish() && constructShow) { baseUI.SetActive(true); foreach (BuildingUI showUI in buildUI) { showUI.gameObject.SetActive(true); } Construction(); } else { constructShow = false; baseUI.SetActive(false); } }
// Update is called once per frame void Update() { if (build.CheckSelect()) { if (build.CheckFinish()) { baseUI.SetActive(true); foreach (BuildingUI showUI in trainUI) { showUI.gameObject.SetActive(true); } if (isTraining) { cancelUI.gameObject.SetActive(true); } else { cancelUI.gameObject.SetActive(false); } } else { baseUI.SetActive(false); foreach (BuildingUI showUI in trainUI) { showUI.gameObject.SetActive(false); } } } else { baseUI.SetActive(false); } TrainingUnit(); }