private void OnCellBecameExploredByCiv(Tuple <IHexCell, ICivilization> data)
        {
            var cityAtCell = CityLocationCanon.GetPossessionsOfOwner(data.Item1).FirstOrDefault();

            if (cityAtCell != null && ExplorationCanon.IsCellExplored(data.Item1))
            {
                CitySummaryManager.BuildSummaryForCity(cityAtCell);
            }
        }
        public void RefreshVisibility(IHexCell cell)
        {
            CellTextureData[cell.Index].r = VisibilityCanon.IsCellVisible(cell) ? (byte)255 : (byte)0;
            CellTextureData[cell.Index].g = ExplorationCanon.IsCellExplored(cell) ? (byte)255 : (byte)0;
            CellTextureData[cell.Index].b = VisibilityCanon.IsCellVisible(cell) ? (byte)255 : (byte)0;

            if (ApplyTextureCoroutine == null)
            {
                ApplyTextureCoroutine = CoroutineInvoker.StartCoroutine(ApplyTexture());
            }
        }
Exemple #3
0
        public void BuildSummaries()
        {
            foreach (var city in CityFactory.AllCities)
            {
                var cityLocation = CityLocationCanon.GetOwnerOfPossession(city);

                if (!ExplorationCanon.IsCellExplored(cityLocation))
                {
                    continue;
                }

                BuildSummaryForCity(city);
            }
        }
Exemple #4
0
        private void OnBeginHoverFired(IHexCell hoveredCell)
        {
            if (!ExplorationCanon.IsCellExplored(hoveredCell))
            {
                return;
            }

            SetCellDataField(hoveredCell);
            SetYieldDisplay(hoveredCell);
            SetResourceNodeDisplay(hoveredCell);

            transform.position = Camera.main.WorldToScreenPoint(hoveredCell.AbsolutePosition);

            gameObject.SetActive(true);
        }