Esempio n. 1
0
        public override ComponentRender TransformRender(SegmentTile tile, TerrainComponent component, ComponentRender render)
        {
            //is there a better way to do this?
            var wallComponent        = tile.GetComponents <WallComponent>();
            var floorComponent       = tile.GetComponents <FloorComponent>();
            var obstructionComponent = tile.GetComponents <ObstructionComponent>();
            var counterComponent     = tile.GetComponents <CounterComponent>();
            var altarComponent       = tile.GetComponents <AltarComponent>();

            if (!floorComponent.Any() && !wallComponent.Any(wall => wall.IsIndestructible) && !obstructionComponent.Any() && !counterComponent.Any() && !altarComponent.Any())
            {
                render.Color = Color.Red;                 // statics that are walkable without floors to go along with them.
            }
            if (render.Color.Equals(Color.Black))
            {
                render.Color = Color.DimGray;
            }

            return(render);
        }
Esempio n. 2
0
        public override ComponentRender TransformRender(SegmentTile tile, TerrainComponent component, ComponentRender render)
        {
            var floorComponents = tile.GetComponents <FloorComponent>();

            if (component is WallComponent wall && wall.IsIndestructible)
            {
                if (floorComponents.Any())
                {
                    render.Color = Color.Yellow;
                }
                else
                {
                    render.Color = Color.Red;
                }
            }
Esempio n. 3
0
        public override ComponentRender TransformRender(SegmentTile tile, TerrainComponent component, ComponentRender render)
        {
            var wallComponent = tile.GetComponents <WallComponent>();

            if (wallComponent.Any(wall => wall.IsIndestructible))
            {
                render.Color = Color.Red;
            }

            if (render.Color.Equals(Color.Black))
            {
                render.Color = Color.DimGray;
            }

            return(render);
        }