C# Class PunkX.Graphic

Base class for all graphical types that can be drawn by Entity.
Show file Open project: RichardMarks/PunkX Class Usage Examples

Public Properties

Property Type Description
active System.Boolean
relative System.Boolean
scrollX float
scrollY float
visible System.Boolean
x float
y float

Public Methods

Method Description
Graphic ( ) : System

constructor

render ( Microsoft point, Microsoft camera ) : void

Renders the graphic to the screen buffer.

update ( ) : void

Updates the graphic.

Method Details

Graphic() public method

constructor
public Graphic ( ) : System
return System

render() public method

Renders the graphic to the screen buffer.
public render ( Microsoft point, Microsoft camera ) : void
point Microsoft The position to draw the graphic.
camera Microsoft The camera offset.
return void

update() public method

Updates the graphic.
public update ( ) : void
return void

Property Details

active public property

If the graphic should update.
public Boolean,System active
return System.Boolean

relative public property

If the graphic should render at its position relative to its parent Entity's position.
public Boolean,System relative
return System.Boolean

scrollX public property

X scrollfactor, effects how much the camera offsets the drawn graphic. Can be used for parallax effect, eg. Set to 0 to follow the camera, 0.5 to move at half-speed of the camera, or 1 (default) to stay still.
public float scrollX
return float

scrollY public property

Y scrollfactor, effects how much the camera offsets the drawn graphic. Can be used for parallax effect, eg. Set to 0 to follow the camera, 0.5 to move at half-speed of the camera, or 1 (default) to stay still.
public float scrollY
return float

visible public property

If the graphic should render.
public Boolean,System visible
return System.Boolean

x public property

X offset.
public float x
return float

y public property

Y offset.
public float y
return float