public void draw(SpriteBatchWrapper sprites) { if (null == current) { return; } else { sprites.drawFromCenter( this.texture, this.getScaledSize(), this.getScaledSize(), (int)this.centerOffset.X, (int)this.centerOffset.Y, this.color * this.current.alpha); } }
public void draw(SpriteBatchWrapper sprites, GraphicsDevice device) { sprites.fillWithColor(Color.Black, 1.0f); if (null == this.player || MediaState.Stopped == this.player.State) return; Texture2D videoTexture = player.GetTexture(); if (null != videoTexture) { if (0 == this.size.Width) this.size = sprites.calcMaxProportionalSize(videoTexture); sprites.drawFromCenter(videoTexture, this.size.Width, this.size.Height); } }
public void draw(SpriteBatchWrapper sprites, GraphicsDevice device) { if (null != backgroundColor) sprites.fillWithColor(backgroundColor, 1.0f); if (!targetSizeIsValid()) { this.targetSize = sprites.calcMaxProportionalSize(this.picture); } sprites.drawFromCenter( this.picture, this.targetSize.Width, this.targetSize.Height, 0, 0, Color.White * this.fadeAmount); }
public void drawCentered(SpriteBatchWrapper sprites, int width, int height, int offsetY) { sprites.drawFromCenter(this.texture, this.activeFrame, width, height, 0, offsetY); }
public void draw(SpriteBatchWrapper sprites) { if (!this.isMoving) return; //TODO add a fade in, for negative travel values Vector2 startingPosition = this.direction * CENTER_OFFSET; Vector2 position = this.direction * this.travel; position *= DirectionalIndicator.FREEDOM; position += startingPosition; int undergroth = 10 + (int)(this.travel * 50); int width = (int)(this.texture.Width + (this.growth * this.texture.Width)); int height = (int)(this.texture.Height + (this.growth * this.texture.Height)); sprites.drawFromCenter( this.texture.texture, width + undergroth, height + undergroth, (int) position.X * -1, (int) position.Y * -1, Color.Black * (1f - this.travel)); sprites.drawFromCenter( this.texture.texture, width, height, (int) position.X * -1, (int) position.Y * -1, this.color); }