Fork me on GitHub
View source

package com.haxepunk

class Graphic


extended by BitmapText, Canvas, Emitter, Graphiclist, Image, Stamp

Base class for graphics type. Do not use this directly, instead use the classes in com.haxepunk.graphics.

Variables

active : Bool

If the graphic should update.

read only blit : Bool

If we can blit the graphic or not (flash/html5)

relative : Bool

If the graphic should render at its position relative to its parent Entity's position.

scrollX : Float

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 : Float

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 : Bool

If the graphic should render.

x : Float

X offset.

y : Float

Y offset.

Functions

View source

destroy () : Void

Removes the graphic from the scene

View source

pause () : Void

Pause updating this graphic.

View source

resume () : Void

Resume updating this graphic.