Skip to content

Instance Functions

addEventListener(type:Int, func:Listener, options?:EventListenerOptions):Void

Description

addForcedTarget(entity:Entity):Void

Description

addTarget(entity:Entity):Void

Description

addTimedTarget(entity:Entity, length:Int):Void

Description

addTimedTargetPoint(point:Point, length:Int):Void

Description

deleteForcedTarget(entity:Entity):Void

Description

deleteTarget(entity:Entity):Void

Description

deleteTimedTarget(entity:Entity):Void

Description

deleteTimedTargetPoint(point:Point):Void

Description

getBackgroundContainer():Container

Description

getBackgroundContainers():Array<Container>

Description

getForegroundContainer():Container

Description

getMode():Int

Description

getParallaxSprites():Array<Sprite>

Description

getViewportHeight():Float

Description

getViewportWidth():Float

Description

getX():Float

Description

getY():Float

Description

getZoomScaleX():Float

Description

getZoomScaleY():Float

Description

hasEventListener(type:Int, func?:Listener):Bool

Description

horizontalShake(intensity:Float, duration?:Int, frequency?:Float, waveType?:Int, decayType?:Int, customWaveSamples?:Array<Float>, customDecaySamples?:Array<Float>):Void

Description

isDisposed():Bool

Description

removeEventListener(type:Int, func:Listener):Void

Description

setBackgroundOffset(index:Int, x:Float, y:Float):Void

Description

Adjust a background container's view body offset. Useful for creating automatic scroll. Parameters:

  • index - Index of the background to offset
  • x - X offset
  • y - Y offset

setLockedPosition(x:Float, y:Float):Void

Description

Set the camera to a locked position. This is only used when the camera is in locked mode. Parameters:

  • x - The x coordinate of the locked position
  • y - The y coordinate of the locked position

setLockedZoom(zoomX:Float, zoomY:Float):Void

Description

Set the camera to a specific zoom amount. Forces the camera into zoom mode if not already in zoom or locked modes. 1x zoom is the default, and 0.5x zoom is zoomed out to show twice the area. Parameters:

  • zoomX - The x zoom factor to apply to the camera
  • zoomY - The y zoom factor to apply to the camera

setMode(mode:Int):Int

Description

shake(intensity:Float, duration?:Int, frequency?:Float, waveType?:Int, decayType?:Int, customWaveSamples?:Array<Float>, customDecaySamples?:Array<Float>):Void

Description

verticalShake(intensity:Float, duration?:Int, frequency?:Float, waveType?:Int, decayType?:Int, customWaveSamples?:Array<Float>, customDecaySamples?:Array<Float>):Void

Description