コード例 #1
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));
        }
コード例 #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;
            }
            if (Cell.Type == CellType.SHALLOW)
            {
                offsetScale = 0;
            }
            sb.Draw(Texture, Cell.X + offsetScale, Cell.Y, Config.HEX_SIZE, Config.HEX_SIZE, color);
        }
コード例 #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
ファイル: Entity.cs プロジェクト: temik911/audio
 internal override void Draw(SpriteBatch sb, DebugStrings ds, int order, StereoEye stereoEye)
 {
     if (order == _order)
         Draw(sb, ds, stereoEye);
 }
コード例 #5
0
ファイル: Entity.cs プロジェクト: temik911/audio
 internal override void Draw(SpriteBatch sb, DebugStrings ds, StereoEye stereoEye)
 {
 }
コード例 #6
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);
 }
コード例 #7
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;
            }
        }
コード例 #8
0
ファイル: Team.cs プロジェクト: temik911/audio
        internal override void Draw(SpriteBatch sb, DebugStrings ds, int order, StereoEye stereoEye)
        {
            base.Draw(sb, ds, order, stereoEye);

            int k = 0;
            if (Config.HEX_SIZE < 24) k = 1;

            int j = 1;
            if (Config.HEX_SIZE < 24) j = 0;

            int pinY = ((int)Field.Field[Config.FIELD_HEIGHT - 1, Config.FIELD_WIDTH - 1].Y + Config.HEX_SIZE * 11 / 8) + TeamId * k * Config.HEX_SIZE;
            int pinX = (int)Field.Field[0, 0].X + TeamId * j * (int)Field.Field[0, (Config.FIELD_WIDTH - 1) / 2].X;
            object[] o = new object[Submarines.Count * 4];
            int i = 0;
            String str = "";
            foreach (Submarine sub in Submarines)
            {
                o[i] = Config.Names[sub.Number];
                str += "{" + i++ + "} - ";
                o[i] = sub.Health;
                str += "{" + i++ + "}/";
                o[i] = sub.TorpedoCount;
                str += "{" + i++ + "}/";
                o[i] = sub.MinesCount;
                str += "{" + i++ + "}   ";
            }
            sb.DrawDebugString(pinX, pinY, string.Format(str, o), Color);
        }
コード例 #9
0
ファイル: VisibleObject.cs プロジェクト: temik911/audio
 internal abstract void Draw(SpriteBatch sb, DebugStrings ds, StereoEye stereoEye);