AlphaAction¶
Inherits: TimedAction
C++ type: AlphaAction
Description¶
Animates the alpha (opacity) property of its target object from a start value to an end value over a fixed duration.
Constructors¶
Available in C++ and Lua:
AlphaAction(Scene* scene)— creates a new entity.AlphaAction(Scene* scene, Entity entity)— wraps an existing entity without taking ownership.
In Lua, use AlphaAction(scene, entity) to access an existing action. The entity must
already have the components required by this type; wrapping does not add them.
See EntityHandle ownership.
Methods¶
| Type | Name | Langs |
|---|---|---|
| void | setAction | C++ | Lua |
Method details¶
setAction¶
- void setAction(float startAlpha, float endAlpha, float duration, bool loop = false)
Configures the tween. startAlpha and endAlpha are opacity values in [0, 1]. duration is in seconds.
Set loop = true to create a continuous pulsing effect.