Fades an object that implements the RGBAProtocol protocol. It modifies the opacity from the current value to a custom one.
More...
Inherits ActionInterval.
Inherited by FadeIn, and FadeOut.
|
static FadeTo * | create (float duration, uint8_t opacity) |
| Creates an action with duration and opacity. More...
|
|
|
unsigned int | _ID |
| object id, ScriptSupport need public _ID
|
|
int | _luaID |
| Lua reference id.
|
|
void * | _scriptObject |
| scriptObject, support for swift
|
|
bool | _rooted |
| When true, it means that the object was already rooted.
|
|
static const int | INVALID_TAG = -1 |
| Default tag used for all the actions.
|
|
Fades an object that implements the RGBAProtocol protocol. It modifies the opacity from the current value to a custom one.
- Warning
- This action doesn't support "reverse"
◆ create()
static FadeTo* create |
( |
float |
duration, |
|
|
uint8_t |
opacity |
|
) |
| |
|
static |
Creates an action with duration and opacity.
- Parameters
-
duration | Duration time, in seconds. |
opacity | A certain opacity, the range is from 0 to 255. |
- Returns
- An autoreleased FadeTo object.
◆ clone()
virtual FadeTo* clone |
( |
| ) |
const |
|
overridevirtual |
◆ reverse()
virtual FadeTo* reverse |
( |
| ) |
const |
|
overridevirtual |
Returns a new action that performs the exact reverse of the action.
- Returns
- A new action that performs the exact reverse of the action. @js NA
Reimplemented from ActionInterval.
Reimplemented in FadeOut, and FadeIn.
◆ startWithTarget()
virtual void startWithTarget |
( |
Node * |
target | ) |
|
|
overridevirtual |
Called before the action start.
It will also set the target.
- Parameters
-
Reimplemented from ActionInterval.
Reimplemented in FadeOut, and FadeIn.
◆ update()
virtual void update |
( |
float |
time | ) |
|
|
overridevirtual |
- Parameters
-
Reimplemented from Action.
◆ initWithDuration()
bool initWithDuration |
( |
float |
duration, |
|
|
uint8_t |
opacity |
|
) |
| |
|
protected |
initializes the action with duration and opacity
- Parameters
-
The documentation for this class was generated from the following file: