Exemplo n.º 1
0
        /// <summary>
        /// 工人到位后开始真正建造
        /// </summary>
        /// <param name="finish"></param>
        /// <returns></returns>
        public IEnumerator Build(Action finish)
        {
            if (mPreBuildingItem != null)
            {
                yield return(StartCoroutine(mPreBuildingItem.Build()));

                finish();
            }
        }
Exemplo n.º 2
0
        public void Build()
        {
            if (AppManager.Instance.SelectedItem != null)
            {
                BuildingItem selectedItem = AppManager.Instance.SelectedItem.GetComponent <BuildingItem>();

                if (selectedItem != null)
                {
                    selectedItem.Build();
                }
            }
        }