public BoundedCanvas(Actor actor) : base(actor) { this.DrawAdditionalContent += spriteBatch => { if (Runtime.DebugLevel > DebugLevel.Passive) { spriteBatch.Begin(); spriteBatch.DrawRectangle(new Rectangle(5, 5, 10, 10), Color.Red, 1, this.actor.transform.Depth); spriteBatch.DrawRectangle(new Rectangle(10, 10, 10, 10), Color.Red, 1, this.actor.transform.Depth); spriteBatch.End(); } }; this.boundingRect = RequireComponent <BoundingRect>(); this.boundingRect.onSizeChange += BuildRenderTarget; if (this.boundingRect.Area > 0) { BuildRenderTarget(this.boundingRect.Size); } }
public BoundingRectFill(Actor actor, Color color, Depth depthOffset) : base(actor) { this.boundingRect = RequireComponent <BoundingRect>(); this.color = color; this.depthOffset = depthOffset; }
public BoundingRectFill(Actor actor, Color color) : base(actor) { this.boundingRect = RequireComponent <BoundingRect>(); this.color = color; }
public DebugIconHoverRenderer(Actor actor) : base(actor) { this.boundingRect = RequireComponent <BoundingRect>(); this.hoverable = RequireComponent <Hoverable>(); }
public SimplePhysicsBody(Actor actor, BodyType bodyType) : base(actor) { this.boundingRect = RequireComponent <BoundingRect>(); this.bodyType = bodyType; this.collisionsThisFrame = new List <CollideMoment>(); }
public BoundedTextureRenderer(Actor actor, Texture2D texture) : base(actor) { this.boundingRect = RequireComponent<BoundingRect>(); this.texture = texture; }
public SimpleButtonRenderer(Actor actor) : base(actor) { this.boundingRect = RequireComponent <BoundingRect>(); this.clickable = RequireComponent <Clickable>(); }
public LayoutElement(Actor actor) : base(actor) { this.boundingRect = RequireComponent <BoundingRect>(); this.parentGroup = this.actor.GetComponentInImmediateParent <LayoutGroup>(); Debug.Assert(this.parentGroup != null, "LayoutElement does not have a LayoutGroup parent"); }
public BoundingRectRenderer(Actor actor) : base(actor) { this.boundingRect = RequireComponent <BoundingRect>(); }
public BoundingRectToViewportSize(Actor actor) : base(actor) { this.boundingRect = RequireComponent <BoundingRect>(); this.boundingRect.SetSize(this.actor.scene.sceneLayers.gameCanvas.ViewportSize); }