public Body(Shape shape = null, Node parent = null) { if (parent != null) this.parent = parent; this.shape = shape ?? new Circle(Node.defaultNodeSize); this.shape.body = this; this.shape.Initialize(); DrawPolygonCenter = true; AfterCloning(); }
public Collider(Shape shape = null, Node parent = null) { float rad = 25; if (parent != null) { this.parent = parent; rad = parent.body.radius; } if (shape != null) { this.shape = shape; } else { this.shape = new Circle(rad); } }
public void SetShape(Shape shape) { shape.body = this; this.shape = shape; }