Example #1
0
        protected override void UpdateRenderedSprite(CPos cell, RendererCellContents content)
        {
            UpdateRenderedSpriteInner(cell, content);

            var directions = CVec.Directions;

            for (var i = 0; i < directions.Length; i++)
            {
                var neighbour = cell + directions[i];
                if (RenderContents.Contains(neighbour))
                {
                    UpdateRenderedSpriteInner(neighbour, RenderContents[neighbour]);
                }
            }
        }
Example #2
0
 bool CellContains(CPos cell, string resourceType)
 {
     return(RenderContents.Contains(cell) && RenderContents[cell].Type == resourceType);
 }