Example #1
0
        public override void DrawGhost(int x, int y, MicroWorld.Graphics.Renderer renderer, Component.Rotation rotation)
        {
            if (texture0cw == null)
            {
                return;
            }
            switch (rotation)
            {
            case Component.Rotation.cw0:
                renderer.Draw(texture0cw, new Rectangle(x, y, (int)GetSizeRotated(rotation).X, (int)GetSizeRotated(rotation).Y),
                              new Color(1f, 1f, 1f, 0.5f));
                break;

            case Component.Rotation.cw90:
                renderer.Draw(texture90cw, new Rectangle(x, y, (int)GetSizeRotated(rotation).X, (int)GetSizeRotated(rotation).Y),
                              new Color(1f, 1f, 1f, 0.5f));
                break;

            case Component.Rotation.cw180:
                break;

            case Component.Rotation.cw270:
                break;

            default:
                renderer.Draw(texture0cw, new Vector2(x, y) + GetCenter(parent.ComponentRotation), null,
                              new Color(1f, 1f, 1f, 0.5f), rotation.GetHashCode() * (float)Math.PI / 2f,
                              GetCenter(parent.ComponentRotation), 1);
                break;
            }
        }
Example #2
0
 public override Vector2 GetSizeRotated(Component.Rotation rotation)
 {
     return(Size);
 }
Example #3
0
        public override void DrawGhost(int x, int y, MicroWorld.Graphics.Renderer renderer, Component.Rotation rotation)
        {
            if (texture0cw == null)
            {
                return;
            }
            switch (rotation)
            {
            case Component.Rotation.cw0:
                renderer.Draw(texture0cw, new Rectangle(x, y, (int)GetSizeRotated(rotation).X, (int)GetSizeRotated(rotation).Y),
                              new Color(1f, 1f, 1f, 0.5f));
                break;

            case Component.Rotation.cw90:
                renderer.Draw(texture90cw, new Rectangle(x, y, (int)GetSizeRotated(rotation).X, (int)GetSizeRotated(rotation).Y),
                              new Color(1f, 1f, 1f, 0.5f));
                break;

            case Component.Rotation.cw180:
            case Component.Rotation.cw270:
            default:
                break;
            }
        }
Example #4
0
 public override Vector2 GetCenter(Component.Rotation rotation)
 {
     return(new Vector2());
 }
Example #5
0
 public override void DrawGhost(int x, int y, MicroWorld.Graphics.Renderer renderer, Component.Rotation rotation)
 {
 }
Example #6
0
 public override Vector2 GetSizeRotated(Component.Rotation rotation)
 {
     return(new Vector2(32, 32));
 }
Example #7
0
        public override void DrawGhost(int x, int y, MicroWorld.Graphics.Renderer renderer, Component.Rotation rotation)
        {
            if (texture0cw == null)
            {
                return;
            }

            renderer.Draw(texture0cw, new Rectangle(x, y, (int)GetSizeRotated(rotation).X, (int)GetSizeRotated(rotation).Y),
                          new Color(1f, 1f, 1f, 0.5f));
        }
Example #8
0
        public override void DrawGhost(int x, int y, MicroWorld.Graphics.Renderer renderer, Component.Rotation rotation)
        {
            if (texture0cw == null)
            {
                return;
            }
            switch (rotation)
            {
            case Component.Rotation.cw0:
                renderer.Draw(texture0cw, new Rectangle(x, y, 48, 24), new Color(1f, 1f, 1f, 0.5f));
                renderer.Draw(textureCenter0cw, new Rectangle(x, y, 48, 24), new Color(0.8f, 0f, 0f, 0.5f));
                break;

            case Component.Rotation.cw90:
                renderer.Draw(texture90cw, new Rectangle(x, y, 24, 48), new Color(1f, 1f, 1f, 0.5f));
                renderer.Draw(textureCenter90cw, new Rectangle(x, y, 24, 48), new Color(0.8f, 0f, 0f, 0.5f));
                break;

            case Component.Rotation.cw180:
                renderer.Draw(texture180cw, new Rectangle(x, y, 48, 24), new Color(1f, 1f, 1f, 0.5f));
                renderer.Draw(textureCenter180cw, new Rectangle(x, y, 48, 24), new Color(0.8f, 0f, 0f, 0.5f));
                break;

            case Component.Rotation.cw270:
                renderer.Draw(texture270cw, new Rectangle(x, y, 24, 48), new Color(1f, 1f, 1f, 0.5f));
                renderer.Draw(textureCenter270cw, new Rectangle(x, y, 24, 48), new Color(0.8f, 0f, 0f, 0.5f));
                break;

            default:
                break;
            }
        }