Packageorg.flixel.data
Classpublic class FlxQuake
InheritanceFlxQuake Inheritance Object

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.

_zoomproperty 
protected var _zoom:uint

The game's level of zoom.

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.

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.