Пример #1
0
        internal override void Draw(SpriteBatch sb, Fusion.Graphics.DebugStrings ds, StereoEye stereoEye)
        {
            float offsetScale = 0;
            if (stereoEye == StereoEye.Left)
                offsetScale = -Config.offsetScale;
            if (stereoEye == StereoEye.Right)
                offsetScale = Config.offsetScale;

            sb.Draw(Texture, Cell.X - offsetScale, Cell.Y, Config.HEX_SIZE, Config.HEX_SIZE, ((Team)Parent).Color);
        }
Пример #2
0
        internal override void Draw(Fusion.Graphics.SpriteBatch sb, Fusion.Graphics.DebugStrings ds, StereoEye stereoEye)
        {
            float offsetScale = 0;

            if (stereoEye == StereoEye.Left)
            {
                offsetScale = -Config.offsetScale;
            }
            if (stereoEye == StereoEye.Right)
            {
                offsetScale = Config.offsetScale;
            }
            sb.Draw(Texture, Cell.X - offsetScale, Cell.Y, Config.HEX_SIZE, Config.HEX_SIZE, new Color(255, 255, 128, 255));
        }
Пример #3
0
        internal override void Draw(Fusion.Graphics.SpriteBatch sb, Fusion.Graphics.DebugStrings ds, StereoEye stereoEye)
        {
            float currentX = X + Config.OffsetX;
            float currentY = Y + Config.OffsetY;

            float offsetScale = 0;

            if (stereoEye == StereoEye.Left)
            {
                offsetScale = -Config.offsetScale;
            }
            if (stereoEye == StereoEye.Right)
            {
                offsetScale = Config.offsetScale;
            }

            var color = new Color(255, 255, 128, 255);

            foreach (Cell cell in pathList)
            {
                sb.Draw(path, cell.X - offsetScale, cell.Y, Config.HEX_SIZE, Config.HEX_SIZE, color);
            }
            sb.Draw(Texture, currentX - offsetScale, currentY, Config.HEX_SIZE, Config.HEX_SIZE, color);
        }
Пример #4
0
        internal override void Draw(Fusion.Graphics.SpriteBatch sb, Fusion.Graphics.DebugStrings ds, StereoEye stereoEye)
        {
            float offsetScale = 0;

            if (stereoEye == StereoEye.Left)
            {
                offsetScale = -Config.offsetScale;
            }
            if (stereoEye == StereoEye.Right)
            {
                offsetScale = Config.offsetScale;
            }
            if (Cell.Type == CellType.SHALLOW)
            {
                offsetScale = 0;
            }
            sb.Draw(Texture, Cell.X + offsetScale, Cell.Y, Config.HEX_SIZE, Config.HEX_SIZE, color);
        }
Пример #5
0
 internal override void Draw(SpriteBatch sb, DebugStrings ds, StereoEye stereoEye)
 {
     sb.Draw(Texture, Cell.X - 1.4f, Cell.Y - 1.4f, Config.HEX_SIZE + 2.8f, Config.HEX_SIZE + 2.8f, Color.White);
 }
Пример #6
0
        internal override void Draw(SpriteBatch sb, DebugStrings ds, StereoEye stereoEye)
        {
            float currentX = X + Config.OffsetX;
            float currentY = Y + Config.OffsetY;

            float offsetScale = 0;
            if (stereoEye == StereoEye.Left)
                offsetScale = -Config.offsetScale;
            if (stereoEye == StereoEye.Right)
                offsetScale = Config.offsetScale;

            sb.Draw(Texture, currentX - offsetScale, currentY, Config.HEX_SIZE, Config.HEX_SIZE, ((Team)Parent).Color);
            float x = ((Team)Parent).TeamId % 2 == 0 ? currentX + 230 * Config.HEX_SIZE / 1000 : currentX + 50 * Config.HEX_SIZE / 1000;
            float y = currentY + 380 * Config.HEX_SIZE / 1000;
            int starSize = Config.HEX_SIZE / 3;
            for (int i = 0; i < _healths; i++)
            {
                sb.Draw(_health, x - offsetScale, y + Config.HEX_SIZE / 3, starSize, starSize, ((Team)Parent).Color);
                x += starSize * 55 / 100 + 1;
            }
        }
Пример #7
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="spriteBatch"></param>
 /// <param name="glyphs"></param>
 /// <param name="offsetX"></param>
 /// <param name="offsetY"></param>
 public static void DrawGlyphs( SpriteBatch spriteBatch, IEnumerable<Glyph> glyphs, int offsetX, int offsetY )
 {
     foreach ( var glyph in glyphs ) {
         spriteBatch.Draw( glyph.Texture, glyph.DstRect, glyph.SrcRect, offsetX, offsetY, glyph.Color );
     }
 }