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; } }
public override Vector2 GetSizeRotated(Component.Rotation rotation) { return(Size); }
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; } }
public override Vector2 GetCenter(Component.Rotation rotation) { return(new Vector2()); }
public override void DrawGhost(int x, int y, MicroWorld.Graphics.Renderer renderer, Component.Rotation rotation) { }
public override Vector2 GetSizeRotated(Component.Rotation rotation) { return(new Vector2(32, 32)); }
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)); }
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; } }