Moai SDK  1.5 revision 1 (MoaiEdition)
MOAIColor Class Reference
Inheritance diagram for MOAIColor:
MOAINode MOAIInstanceEventSource MOAIEventSource MOAIProp MOAIProp MOAIProp2D MOAILayer MOAIParticleSystem MOAITextBox MOAILayer MOAIParticleSystem MOAITextBox MOAILayer2D

List of all members.

Function List

  moveColor
  seekColor
  setColor
  setParent

Function Documentation

Animate the color by applying a delta. Creates and returns a MOAIEaseDriver initialized to apply the delta.


function moveColor ( MOAIColor self, number rDelta, number gDelta, number bDelta, number aDelta, number length [, number mode ] )
Parameters:
self ( MOAIColor )
rDelta ( number ) Delta to be added to r.
gDelta ( number ) Delta to be added to g.
bDelta ( number ) Delta to be added to b.
aDelta ( number ) Delta to be added to a.
length ( number ) Length of animation in seconds.
mode ( number ) Optional. The ease mode. One of MOAIEaseType.EASE_IN, MOAIEaseType.EASE_OUT, MOAIEaseType.FLAT MOAIEaseType.LINEAR, MOAIEaseType.SMOOTH, MOAIEaseType.SOFT_EASE_IN, MOAIEaseType.SOFT_EASE_OUT, MOAIEaseType.SOFT_SMOOTH. Defaults to MOAIEaseType.SMOOTH.
Returns:
easeDriver ( MOAIEaseDriver )

Animate the color by applying a delta. Delta is computed given a target value. Creates and returns a MOAIEaseDriver initialized to apply the delta.


function seekColor ( MOAIColor self, number rGoal, number gGoal, number bGoal, number aGoal, number length [, number mode ] )
Parameters:
self ( MOAIColor )
rGoal ( number ) Desired resulting value for r.
gGoal ( number ) Desired resulting value for g.
bGoal ( number ) Desired resulting value for b.
aGoal ( number ) Desired resulting value for a.
length ( number ) Length of animation in seconds.
mode ( number ) Optional. The ease mode. One of MOAIEaseType.EASE_IN, MOAIEaseType.EASE_OUT, MOAIEaseType.FLAT MOAIEaseType.LINEAR, MOAIEaseType.SMOOTH, MOAIEaseType.SOFT_EASE_IN, MOAIEaseType.SOFT_EASE_OUT, MOAIEaseType.SOFT_SMOOTH. Defaults to MOAIEaseType.SMOOTH.
Returns:
easeDriver ( MOAIEaseDriver )

Initialize the color.


function setColor ( MOAIColor self, number r, number g, number b [, number a ] )
Parameters:
self ( MOAIColor )
r ( number ) Default value is 0.
g ( number ) Default value is 0.
b ( number ) Default value is 0.
a ( number ) Optional. Default value is 1.
Returns:
nil

This method has been deprecated. Use MOAINode setAttrLink instead.


function setParent ( MOAIColor self [, MOAINode parent ] )
Parameters:
self ( MOAIColor )
parent ( MOAINode ) Optional. Default value is nil.
Returns:
nil

Reimplemented in MOAIProp, MOAIProp, and MOAIProp2D.