Ejemplo n.º 1
0
 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();
 }
Ejemplo n.º 2
0
 private void RemoveBuilding(BuildingBase building)
 {
     buildings.Remove(building);
     if (OnBuildingListChanged != null)
     {
         OnBuildingListChanged();
     }
 }
Ejemplo n.º 3
0
 private void AddBuilding(BuildingBase building, BuildingsData data)
 {
     buildings.Add(building);
     if (OnBuildingListChanged != null)
     {
         OnBuildingListChanged();
     }
 }
Ejemplo n.º 4
0
 private void SetBuildingHoveringOver(BuildingBase building)
 {
     if (BuildingHoveringOver != null)
     {
         BuildingHoveringOver.OnHoverExit();
     }
     BuildingHoveringOver = building;
     if (BuildingHoveringOver != null)
     {
         BuildingHoveringOver.OnHoverEnter(onHoverOutlineWidth);
     }
 }
Ejemplo n.º 5
0
        private void Update()
        {
            if (EventSystem.current.IsPointerOverGameObject())
            {
                BuildingHoveringOver = null;
                return;
            }

            if (Input.GetMouseButtonDown(0))
            {
                OnClick();
            }
            else
            {
                OnHover();
            }
        }