Moai SDK  1.5 revision 1 (MoaiEdition)
MOAIParticleForce Class Reference
Inheritance diagram for MOAIParticleForce:
MOAITransform MOAITransformBase MOAINode MOAIInstanceEventSource MOAIEventSource

List of all members.

Function List

  initAttractor
  initBasin
  initLinear
  initRadial
  setType

Function Documentation

Greater force is exerted on particles as they approach attractor.


function initAttractor ( MOAIParticleForce self, number radius [, number magnitude ] )
Parameters:
self ( MOAIParticleForce )
radius ( number ) Size of the attractor.
magnitude ( number ) Optional. Strength of the attractor.
Returns:
nil

Greater force is exerted on particles as they leave attractor.


function initBasin ( MOAIParticleForce self, number radius [, number magnitude ] )
Parameters:
self ( MOAIParticleForce )
radius ( number ) Size of the attractor.
magnitude ( number ) Optional. Strength of the attractor.
Returns:
nil

A constant linear force will be applied to the particles.


function initLinear ( MOAIParticleForce self, number x [, number y ] )
Parameters:
self ( MOAIParticleForce )
x ( number )
y ( number ) Optional.
Returns:
nil

A constant radial force will be applied to the particles.


function initRadial ( MOAIParticleForce self, number magnitude )
Parameters:
self ( MOAIParticleForce )
magnitude ( number )
Returns:
nil

Set the type of force. FORCE will factor in the particle's mass. GRAVITY will ignore the particle's mass. OFFSET will ignore both mass and damping.


function setType ( MOAIParticleForce self, number type )
Parameters:
self ( MOAIParticleForce )
type ( number ) One of MOAIParticleForce.FORCE, MOAIParticleForce.GRAVITY, MOAIParticleForce.OFFSET
Returns:
nil