/// <summary> /// 工人到位后开始真正建造 /// </summary> /// <param name="finish"></param> /// <returns></returns> public IEnumerator Build(Action finish) { if (mPreBuildingItem != null) { yield return(StartCoroutine(mPreBuildingItem.Build())); finish(); } }
public void Build() { if (AppManager.Instance.SelectedItem != null) { BuildingItem selectedItem = AppManager.Instance.SelectedItem.GetComponent <BuildingItem>(); if (selectedItem != null) { selectedItem.Build(); } } }