예제 #1
0
        public void DrawPartialSprite(int x, int y, olcSprite sprite, int ox, int oy, int w, int h)
        {
            if (sprite == null)
            {
                return;
            }

            for (int i = 0; i < w; i++)
            {
                for (int j = 0; j < h; j++)
                {
                    if (sprite.GetGlyph(i + ox, j + oy) != ' ')
                    {
                        Draw(x + i, y + j, sprite.GetGlyph(i + ox, j + oy), sprite.getColor(i + ox, j + oy));
                    }
                }
            }
        }
예제 #2
0
        public void DrawSprite(int x, int y, olcSprite sprite)
        {
            if (sprite == null)
            {
                return;
            }

            for (int i = 0; i < sprite.nWidth; i++)
            {
                for (int j = 0; j < sprite.nHeight; j++)
                {
                    if (sprite.GetGlyph(i, j) != ' ')
                    {
                        Draw(x + i, y + j, sprite.GetGlyph(i, j), sprite.getColor(i, j));
                    }
                }
            }
        }