public void selectBulkUnits(Vector3 startDrag, Vector3 endDrag) { clearSelectedUnits(); RayBox rayBox = new RayBox(startDrag, endDrag); rayBox.drawBox(); foreach (Collider col in rayBox.drawOverlapBox()) { if (col.gameObject.GetComponent <UnitController>()) { col.gameObject.GetComponent <UnitController>().isSelected = true; } } updateSelectedUnits(); }
public void showDrag(Vector3 startDrag, Vector3 endDrag) { RayBox box = new RayBox(startDrag, endDrag); box.drawBox(); }