Пример #1
0
        private void addCellIndex(IntVec3 position, bool isBlocked)
        {
            var _idx = position.AsCellIndex();

            //protect from multipoe entires of the same index. I know we can use an array but in this case we want an IEnumarable list
            if (!ColorCellIndexCache.Any(x => x.CellGridIndex == _idx))
            {
                ColorCellIndexCache.Add(new GlowGridCache
                {
                    Position         = position,
                    CellGridIndex    = _idx,
                    ColorAtCellIndex = isBlocked ? new Color32(0, 0, 0, 0) : Color,
                    IsBlocked        = isBlocked
                });
            }


            //Log.Message("ANGLE POS: " + position.ToLog());
        }