// This one is so that when a thing is destroyed, this can be called public static void DeselectSelectable(Selectable currentSelectable) { if (selected.Count > 0) { if (selected[0].gameObject == currentSelectable.gameObject) { if (selected[0].GetComponent <CommandStructure>() != null) { PlayerBuildingManager.CancelBuildingPlacement(); } selected.Remove(currentSelectable); UpdateDescription(); } else { selected.Remove(currentSelectable); } } }
private void ClickButton() { PlayerBuildingManager.CancelBuildingPlacement(); PlayerBuildingManager.SetNewBuilding(attachedStructure); }
private void ReverseButtonClick() { SelectionManager.UpdateDescription(); PlayerBuildingManager.CancelBuildingPlacement(); }