private void AddBuilding(BuildingBase building, ClimateBuildingsData data) { buildings.Add(building); // commented so winCondition doesn't get triggered when building a dike //if(OnBuildingListChanged != null) // OnBuildingListChanged(); }
private void RemoveBuilding(BuildingBase building) { buildings.Remove(building); if (OnBuildingListChanged != null) { OnBuildingListChanged(); } }
private void AddBuilding(BuildingBase building, BuildingsData data) { buildings.Add(building); if (OnBuildingListChanged != null) { OnBuildingListChanged(); } }
private void SetBuildingHoveringOver(BuildingBase building) { if (BuildingHoveringOver != null) { BuildingHoveringOver.OnHoverExit(); } BuildingHoveringOver = building; if (BuildingHoveringOver != null) { BuildingHoveringOver.OnHoverEnter(onHoverOutlineWidth); } }
private void Update() { if (EventSystem.current.IsPointerOverGameObject()) { BuildingHoveringOver = null; return; } if (Input.GetMouseButtonDown(0)) { OnClick(); } else { OnHover(); } }