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

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