Packageorg.flintparticles.twoD.actions
Classpublic class TurnAwayFromMouse
InheritanceTurnAwayFromMouse Inheritance TurnTowardsMouse Inheritance ActionBase Inheritance Object

The TurnAwayFromMouse action causes the particle to constantly adjust its direction so that it travels away from the mouse pointer.



Public Properties
 PropertyDefined By
  power : Number
[override] The strength of the turn action.
TurnAwayFromMouse
 Inheritedpriority : int
Returns a default priority of 0 for this action.
ActionBase
 Inheritedrenderer : DisplayObject
The display object whose coordinate system the mouse position is converted to.
TurnTowardsMouse
Protected Properties
 PropertyDefined By
 Inherited_priority : int = 0
ActionBase
Public Methods
 MethodDefined By
  
TurnAwayFromMouse(power:Number = 0, renderer:DisplayObject = null)
The constructor creates a TurnAwayFromMouse action for use by an emitter.
TurnAwayFromMouse
 Inherited
addedToEmitter(emitter:Emitter):void
This method does nothing.
ActionBase
 Inherited
This method does nothing.
ActionBase
 Inherited
update(emitter:Emitter, particle:Particle, time:Number):void
[override] Calculates the direction to the mouse and turns the particle towards this direction.
TurnTowardsMouse
Property Detail
powerproperty
power:Number[override]

The strength of the turn action. Higher values produce a sharper turn.


Implementation
    public function get power():Number
    public function set power(value:Number):void
Constructor Detail
TurnAwayFromMouse()Constructor
public function TurnAwayFromMouse(power:Number = 0, renderer:DisplayObject = null)

The constructor creates a TurnAwayFromMouse action for use by an emitter. To add a TurnAwayFromMouse to all particles created by an emitter, use the emitter's addAction method.

Parameters
power:Number (default = 0) — The strength of the turn action. Higher values produce a sharper turn.
 
renderer:DisplayObject (default = null) — The display object whose coordinate system the mouse position is converted to. This is usually the renderer for the particle system created by the emitter.

See also