コード例 #1
0
        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());
            }
        }
コード例 #2
0
        private bool IsUnitValidForIcon(IUnit unit)
        {
            var unitLocation = UnitPositionCanon.GetOwnerOfPossession(unit);

            return(VisibilityCanon.IsCellVisible(unitLocation) && unit.Type != UnitType.City);
        }