Class cc.FadeTo

Class Summary
Constructor Attributes Constructor Name and Description
 
Fades an object that implements the cc.RGBAProtocol protocol.

Method Summary

Class Detail

cc.FadeTo()
Fades an object that implements the cc.RGBAProtocol protocol. It modifies the opacity from the current value to a custom one.

Method Detail

  • {cc.FadeTo} clone()
    returns a new clone of the action
    Returns:
    {cc.FadeTo}
  • <static> {cc.FadeTo} cc.FadeTo.create(duration, opacity)
    // example
    var action = cc.FadeTo.create(1.0, 0);
    Parameters:
    {Number} duration
    {Number} opacity
    0-255, 0 is transparent
    Returns:
    {cc.FadeTo}
  • {Boolean} initWithDuration(duration, opacity)
    Parameters:
    {Number} duration
    duration in seconds
    {Number} opacity
    Returns:
    {Boolean}
  • startWithTarget(target)
    Parameters:
    {cc.Sprite} target
  • update(time)
    Parameters:
    {Number} time
    time in seconds