Class cc.TintBy

Class Summary
Constructor Attributes Constructor Name and Description
 
cc.TintBy(duration, deltaRed, deltaGreen, deltaBlue)
Tints a cc.Node that implements the cc.NodeRGB protocol from current tint to a custom one.

Method Summary

Class Detail

cc.TintBy(duration, deltaRed, deltaGreen, deltaBlue)
Tints a cc.Node that implements the cc.NodeRGB protocol from current tint to a custom one. Relative to their own color change.
var action = new cc.TintBy(2, -127, -255, -127);
Parameters:
{Number} duration
duration in seconds
{Number} deltaRed
{Number} deltaGreen
{Number} deltaBlue

Field Detail

<static> {cc.TintBy} cc.TintBy.create
Please use cc.tintBy instead. Tints a cc.Node that implements the cc.NodeRGB protocol from current tint to a custom one. Relative to their own color change.
Deprecated:
since v3.0 please use cc.tintBy instead.

Method Detail

  • {cc.TintBy} clone()
    returns a new clone of the action
    Returns:
    {cc.TintBy}
  • ctor(duration, deltaRed, deltaGreen, deltaBlue)
    Constructor function, override it to extend the construction behavior, remember to call "this._super()" in the extended "ctor" function.
    Parameters:
    {Number} duration
    duration in seconds
    {Number} deltaRed
    {Number} deltaGreen
    {Number} deltaBlue
  • {Boolean} initWithDuration(duration, deltaRed, deltaGreen, deltaBlue)
    Initializes the action.
    Parameters:
    {Number} duration
    {Number} deltaRed
    0-255
    {Number} deltaGreen
    0-255
    {Number} deltaBlue
    0-255
    Returns:
    {Boolean}
  • {cc.TintBy} reverse()
    Returns a reversed action.
    Returns:
    {cc.TintBy}
  • startWithTarget(target)
    Start the action with target.
    Parameters:
    {cc.Node} target
  • update(dt)
    Called once per frame. Time is the number of seconds of a frame interval.
    Parameters:
    {Number} dt
    time in seconds