Package | net.flashpunk |
Class | public class Graphic |
Inheritance | Graphic Object |
Subclasses | Canvas, Emitter, Graphiclist, Image, Stamp |
Property | Defined By | ||
---|---|---|---|
active : Boolean = false
If the graphic should update. | Graphic | ||
relative : Boolean = true
If the graphic should render at its position relative to its parent Entity's position. | Graphic | ||
scrollX : Number = 1
X scrollfactor, effects how much the camera offsets the drawn graphic. | Graphic | ||
scrollY : Number = 1
Y scrollfactor, effects how much the camera offsets the drawn graphic. | Graphic | ||
visible : Boolean = true
If the graphic should render. | Graphic | ||
x : Number = 0
X offset. | Graphic | ||
y : Number = 0
Y offset. | Graphic |
Property | Defined By | ||
---|---|---|---|
assign : Function | Graphic |
Method | Defined By | ||
---|---|---|---|
Graphic()
Constructor. | Graphic | ||
render(target:BitmapData, point:Point, camera:Point):void
Renders the graphic to the screen buffer. | Graphic | ||
update():void
Updates the graphic. | Graphic |
active | property |
public var active:Boolean = false
If the graphic should update.
assign | property |
assign:Function
protected function get assign():Function
protected function set assign(value:Function):void
relative | property |
public var relative:Boolean = true
If the graphic should render at its position relative to its parent Entity's position.
scrollX | property |
public var scrollX:Number = 1
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.
scrollY | property |
public var scrollY:Number = 1
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.
visible | property |
public var visible:Boolean = true
If the graphic should render.
x | property |
public var x:Number = 0
X offset.
y | property |
public var y:Number = 0
Y offset.
Graphic | () | Constructor |
public function Graphic()
Constructor.
render | () | method |
public function render(target:BitmapData, point:Point, camera:Point):void
Renders the graphic to the screen buffer.
Parameters
target:BitmapData — The buffer to draw to.
| |
point:Point — The position to draw the graphic.
| |
camera:Point — The camera offset.
|
update | () | method |
public function update():void
Updates the graphic.