示例#1
0
        public void Draw(RLConsole console, IMap map)
        {
            if (!map.GetCell(X, Y).IsExplored)
            {
                return;
            }

            if (map.IsInFov(X, Y))
            {
                if (this is ItemPassive)
                {
                    Color = Colors.FloorFov;
                }
                else if (this is ItemActive)
                {
                    if (this is HealthPotion)
                    {
                        Color = Colors.Potion;
                    }
                    else
                    {
                        Color = Colors.Scroll;
                    }
                }
                ColorBackground = Colors.FloorBackground;
                console.Set(X, Y, Color, ColorBackground, Symbol);
            }
            else
            {
                Color           = Colors.Floor;
                ColorBackground = Colors.FloorBackground;
                console.SetColor(X, Y, Color);
                console.SetBackColor(X, Y, ColorBackground);
            }
        }
示例#2
0
        public void Draw(RLConsole console, IMap map)
        {
            if (!map.IsExplored(X, Y))
            {
                return;
            }

            if (map.IsInFov(X, Y))
            {
                console.Set(X, Y, Color, Colors.FloorBackgroundFov, 'G');
            }
            else
            {
                console.SetColor(X, Y, Colors.Floor);
                console.SetBackColor(X, Y, Colors.FloorBackground);
            }
        }