private void UpdateBuilder() { if (actionLockController.IsLocked()) { return; } if (builder == null) { return; } nearestToBuilder = GetNearest(buildDistance, builder.root.position); if (nearestToBuilder == null) { Unindicate(); return; } if (nearestToBuilder.GetBlockCount() >= nearestToBuilder.GetMaxBlock()) { Unindicate(); return; } Indicate(nearestToBuilder); }
private void HandleBuildRequest() { if (nearestToBuilder == null) { return; } for (int i = 0; i < buildCount; i++) { if (nearestToBuilder.GetBlockCount() == nearestToBuilder.GetMaxBlock()) { break; } nearestToBuilder.AddBlock(); } }