Class cc.FadeTo
- Defined in: CCActionInterval.js
- Extends cc.ActionInterval
Constructor Attributes | Constructor Name and Description |
---|---|
cc.FadeTo(duration, opacity)
Fades an object that implements the cc.RGBAProtocol protocol.
|
Method Summary
Class Detail
cc.FadeTo(duration, opacity)
Fades an object that implements the cc.RGBAProtocol protocol. It modifies the opacity from the current value to a custom one.
var action = new cc.FadeTo(1.0, 0);
- Parameters:
- {Number} duration
- {Number} opacity
- 0-255, 0 is transparent
Field Detail
Please use cc.fadeTo instead.
Fades an object that implements the cc.RGBAProtocol protocol. It modifies the opacity from the current value to a custom one.
- Deprecated:
- since v3.0 please use cc.fadeTo instead.
Method Detail
-
{cc.FadeTo} clone()returns a new clone of the action
- Returns:
- {cc.FadeTo}
-
ctor(duration, opacity)Constructor function, override it to extend the construction behavior, remember to call "this._super()" in the extended "ctor" function.
- Parameters:
- {Number} duration
- {Number} opacity
- 0-255, 0 is transparent
-
{Boolean} initWithDuration(duration, opacity)Initializes the action.
- Parameters:
- {Number} duration
- duration in seconds
- {Number} opacity
- Returns:
- {Boolean}
-
startWithTarget(target)Start this action with target.
- Parameters:
- {cc.Node} target
-
update(time)Called once per frame. Time is the number of seconds of a frame interval.
- Parameters:
- {Number} time
- time in seconds