public void ClearLine(EntityCommandBuffer ecb, int line, char clearChar, Color color) { for (int i = 0; i < Width; i++) { Blit(ecb, new int2(i, line), clearChar, color); } }
public void Blit(EntityCommandBuffer ecb, int2 xy, string s, Color color) { int writeToX = xy.x; foreach (char c in s) { Blit(ecb, new int2(writeToX, xy.y), c, color); writeToX++; } }
public void Blit(EntityCommandBuffer ecb, int2 xy, int c, Color color) { if (!GlobalGraphicsSettings.ascii) { return; } Entity e = ViewTiles[XYToIndex(xy, Width)]; ecb.SetComponent(e, new Sprite2DRenderer { sprite = SpriteSystem.IndexSprites[SpriteSystem.ConvertToGraphics((char)c)], color = color }); }
static Color GetColorForDoor(Tile tile) { Color color = TinyRogueConstants.DefaultColor; if (!tile.IsSeen && tile.HasBeenRevealed) { color.r /= 2f; color.g /= 2f; color.b /= 2f; } else if (!tile.IsSeen) { color.a = 0f; } return(color); }