private IEnumerator Build(Construction construction) { yield return StartCoroutine(MoveTo(new Vector3[1] { construction.transform.position })); while (!construction.IsDone) { construction.Build(properties.unitsBuildedPerSecond); yield return new WaitForSeconds(1); } }
public void Construct(Node node) { if (!_construction.Build(node)) { return; } _construction = null; SelectContruction(constructionIndex); }
private IEnumerator Build(Construction construction) { yield return(StartCoroutine(MoveTo(new Vector3[1] { construction.transform.position }))); while (!construction.IsDone) { construction.Build(properties.unitsBuildedPerSecond); yield return(new WaitForSeconds(1)); } }