Class cc.FadeTo
Extends
cc.ActionInterval.
Defined in: CCActionInterval.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Fades an object that implements the cc.RGBAProtocol protocol.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
cc.FadeTo.create(duration, opacity)
|
initWithDuration(duration, opacity)
|
|
startWithTarget(target)
|
|
update(time)
|
- Methods borrowed from class cc.ActionInterval:
- getAmplitudeRate, getElapsed, isDone, reverse, setAmplitudeRate, step
- Methods borrowed from class cc.FiniteTimeAction:
- getDuration, setDuration
- Methods borrowed from class cc.Action:
- copy, copyWithZone, description, getOriginalTarget, getTag, getTarget, release, retain, setOriginalTarget, setTag, setTarget, stop
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
<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