C# Class Nez.SpriteOutlineRenderer

renders a sprite with an outline in a very inefficient (but simple) way. The sprite is rendered multiple times offset/colored then it is rendered normally on top of that.
Inheritance: RenderableComponent
Show file Open project: prime31/Nez

Public Properties

Property Type Description
outlineColor Microsoft.Xna.Framework.Color
outlineWidth int

Public Methods

Method Description
SpriteOutlineRenderer ( Sprite sprite ) : Nez.Sprites

the Sprite passed in will be disabled. The SpriteOutlineRenderer will handle manually calling its render method.

onEntityTransformChanged ( Transform comp ) : void
render ( Graphics graphics, Camera camera ) : void

Method Details

SpriteOutlineRenderer() public method

the Sprite passed in will be disabled. The SpriteOutlineRenderer will handle manually calling its render method.
public SpriteOutlineRenderer ( Sprite sprite ) : Nez.Sprites
sprite Nez.Sprites.Sprite Sprite.
return Nez.Sprites

onEntityTransformChanged() public method

public onEntityTransformChanged ( Transform comp ) : void
comp Transform
return void

render() public method

public render ( Graphics graphics, Camera camera ) : void
graphics Graphics
camera Camera
return void

Property Details

outlineColor public property

the color the sprite will be tinted when it is rendered
public Color,Microsoft.Xna.Framework outlineColor
return Microsoft.Xna.Framework.Color

outlineWidth public property

the width of the outline
public int outlineWidth
return int