コード例 #1
0
ファイル: BaseC.cs プロジェクト: temik911/audio
        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
ファイル: Torpedo.cs プロジェクト: nkast/FusionFramework
        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
ファイル: Marker.cs プロジェクト: temik911/audio
 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
ファイル: Submarine.cs プロジェクト: temik911/audio
        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
ファイル: SpriteFont.cs プロジェクト: temik911/audio
 /// <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 );
     }
 }