Packageorg.flixel.data
Classpublic class FlxQuake

This is a special effects utility class to help FlxGame do the 'quake' or screenshake effect.



Public Properties
 PropertyDefined by
  x : int
The amount of X distortion to apply to the screen.
FlxQuake
  y : int
The amount of Y distortion to apply to the screen.
FlxQuake
Protected Properties
 PropertyDefined by
  _intensity : Number
The intensity of the quake effect: a percentage of the screen's size.
FlxQuake
  _timer : Number
Set to countdown the quake time.
FlxQuake
  _zoom : uint
The game's level of zoom.
FlxQuake
Public Methods
 MethodDefined by
  
FlxQuake(Zoom:uint)
Constructor.
FlxQuake
  
start(Intensity:Number = 0.05, Duration:Number = 0.5):void
Reset and trigger this special effect.
FlxQuake
  
stop():void
Stops this screen effect.
FlxQuake
  
update():void
Updates and/or animates this special effect.
FlxQuake
Property detail
_intensityproperty
protected var _intensity:Number

The intensity of the quake effect: a percentage of the screen's size.

_timerproperty 
protected var _timer:Number

Set to countdown the quake time.

xproperty 
public var x:int

The amount of X distortion to apply to the screen.

yproperty 
public var y:int

The amount of Y distortion to apply to the screen.

_zoomproperty 
protected var _zoom:uint

The game's level of zoom.

Constructor detail
FlxQuake()constructor
public function FlxQuake(Zoom:uint)

Constructor.

Parameters
Zoom:uint
Method detail
start()method
public function start(Intensity:Number = 0.05, Duration:Number = 0.5):void

Reset and trigger this special effect.

Parameters
Intensity:Number (default = 0.05) — Percentage of screen size representing the maximum distance that the screen can move during the 'quake'.
 
Duration:Number (default = 0.5) — The length in seconds that the "quake" should last.
stop()method 
public function stop():void

Stops this screen effect.

update()method 
public function update():void

Updates and/or animates this special effect.