C# Class Nez.TrailRibbon

Renders a trail behind a moving object Adapted from http://www.paradeofrain.com/2010/01/28/update-on-continuous-2d-trails-in-xna/
Inheritance: RenderableComponent, IUpdatable
Datei anzeigen Open project: prime31/Nez

Public Properties

Property Type Description
endColor Color
ribbonRadius float
startColor Color

Public Methods

Method Description
TrailRibbon ( ) : System
TrailRibbon ( int ribbonLength ) : System
isVisibleFromCamera ( Camera camera ) : bool
onAddedToEntity ( ) : void
onEnabled ( ) : void
render ( Graphics graphics, Camera camera ) : void

Private Methods

Method Description
IUpdatable ( ) : void
calculateVertices ( ) : void

transfers the data from our segments to the vertices for display

initializeVertices ( ) : void

builds the intialial ribbon segments

Method Details

TrailRibbon() public method

public TrailRibbon ( ) : System
return System

TrailRibbon() public method

public TrailRibbon ( int ribbonLength ) : System
ribbonLength int
return System

isVisibleFromCamera() public method

public isVisibleFromCamera ( Camera camera ) : bool
camera Camera
return bool

onAddedToEntity() public method

public onAddedToEntity ( ) : void
return void

onEnabled() public method

public onEnabled ( ) : void
return void

render() public method

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

Property Details

endColor public_oe property

end (tail) color of the ribbon
public Color endColor
return Color

ribbonRadius public_oe property

max pixel radius of the ribbon
public float ribbonRadius
return float

startColor public_oe property

starting color of the ribbon
public Color startColor
return Color