//private Name colName; public CollisionSprite() : base() { lineWidth = 1.0f; line = null; rect = null; }
public void set(SpriteEnum sName, Index index, Azul.Color color, float x, float y, float width, float height) { //Debug.Assert(color != null); this.setBase(sName, index, 0.0f, 0.0f); lineWidth = 1.0f; this.sprColor = color; rect = new Azul.Rect(x, y, width, height); line = new Azul.Line(this.lineWidth, this.sprColor, x, y, x + width, y + height); }
private float halfHeight; // Recaulcated only when height changes // // Constructors // /// <summary> /// Private common constructor /// </summary> private void ctor(float x, float y, float w, float h, Azul.Color color, float thickness) { this.x = x; this.y = y; this.width = w; this.height = h; this.halfWidth = w / 2.0f; this.halfHeight = h / 2.0f; this.lineColor = color; this.outline = new Azul.Line(thickness, color, x, y, w, h); }
public RectDrawable(float x, float y, float w, float h, Azul.Color color, float thickness) { //this.outline = null; //this.ctor(x, y, w, h, color, thickness); this.x = x; this.y = y; this.width = w; this.height = h; this.halfWidth = w / 2.0f; this.halfHeight = h / 2.0f; this.lineColor = color; this.outline = new Azul.Line(thickness, color, x, y, w, h); }
public RectDrawable(float x, float y, float w, float h, Azul.Color color) { this.outline = null; this.ctor(x, y, w, h, color, 1.0f); }
public RectDrawable(float x, float y, float w, float h) { this.outline = null; this.ctor(x, y, w, h, Colors.White, 1.0f); }
private RectDrawable() { // Private, not implemented this.outline = null; }